Skip to content

Commit aa5120b

Browse files
committed
(refactor/test): split persist options into own describe
- just better organization and separation of concerns / test suites - might eventually split these out into separate files
1 parent 53aad0d commit aa5120b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/index.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function getItem(key: string) {
99
return item ? JSON.parse(item) : null // can only parse strings
1010
}
1111

12-
describe('persist', () => {
12+
describe('basic persist functionality', () => {
1313
beforeEach(() => window.localStorage.clear())
1414

1515
it('should persist nothing if no actions are used', async () => {
@@ -34,6 +34,10 @@ describe('persist', () => {
3434
await persist('user', user)
3535
expect(getSnapshot(user)).toStrictEqual(persistedDataF)
3636
})
37+
})
38+
39+
describe('persist options', () => {
40+
beforeEach(() => window.localStorage.clear())
3741

3842
it('shouldn\'t jsonify', async () => {
3943
const user = UserStoreF.create()

0 commit comments

Comments
 (0)