diff --git a/test/index.node.spec.ts b/test/index.node.spec.ts new file mode 100644 index 0000000..9e5564f --- /dev/null +++ b/test/index.node.spec.ts @@ -0,0 +1,16 @@ +/** + * @jest-environment node + */ +// add tests in this file that are specific to node (vs. jsdom) + +/// + +import { persist } from '../src/index' +import { UserStoreF } from './fixtures' + +describe('node usage', () => { + it('should error on default localStorage usage', async () => { + const user = UserStoreF.create() + await expect(persist('user', user)).rejects.toMatch(/^localStorage.+$/) + }) +})