@rafaelcavalcante/uselocalstorage
Version:
A React hook to handle localStorage with ease
12 lines (8 loc) • 330 B
JavaScript
import { renderHook } from "@testing-library/react-hooks";
import { useLocalStorage } from ".";
describe("the useLocalStorage hook", () => {
it("should return it's methods succesfully", () => {
const { result } = renderHook(() => useLocalStorage());
expect(result.current.getItem).toBeInstanceOf(Function);
});
});