Requires jsdom
describe("module", () => {
beforeAll(() => {
jest.spyOn(console, "error").mockImplementation(() => {});
});
it("should read valid data from localStorage", () => {
expect(console.error).toBeCalledWith(
expect.stringContaining("Unable to parse data from serialised JSON")
);
});
});