UNPKG

@rafaelcavalcante/uselocalstorage

Version:
12 lines (8 loc) 330 B
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); }); });