import {
  setLocalStorage,
  getLocalStorage,
  deleteLocalStorage,
  clearLocalStorage,
} from "./index";

test("add localStorage", () => {
  setLocalStorage({ name: "aaa", age: 111 });
  expect(getLocalStorage("name")).toEqual("aaa");
  expect(getLocalStorage("test")).toEqual(null);
});

test("delete localStorage", () => {
  expect(deleteLocalStorage("name")).toBe(true);
});

test("clear localStorage", () => {
  expect(clearLocalStorage()).toBe(true);
});
