Skip to content

Commit

Permalink
(refactor/test): split persist options into own describe
Browse files Browse the repository at this point in the history
- just better organization and separation of concerns / test suites
  - might eventually split these out into separate files
  • Loading branch information
agilgur5 committed Nov 19, 2019
1 parent d49f864 commit 319546f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getItem(key: string) {
return item ? JSON.parse(item) : null // can only parse strings
}

describe('persist', () => {
describe('basic persist functionality', () => {
beforeEach(() => window.localStorage.clear())

it('should persist nothing if no actions are used', async () => {
Expand All @@ -34,6 +34,10 @@ describe('persist', () => {
await persist('user', user)
expect(getSnapshot(user)).toStrictEqual(persistedDataF)
})
})

describe('persist options', () => {
beforeEach(() => window.localStorage.clear())

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

0 comments on commit 319546f

Please sign in to comment.