Skip to content

Commit

Permalink
test: stubReset option
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 8, 2023
1 parent 5f526a3 commit 025575d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/testing/src/testing.spec.ts
Expand Up @@ -161,6 +161,22 @@ describe('Testing', () => {
expect(counter.n).toBe(0)
})

it('can stub $reset calls in option stores', () => {
const { counter } = factory({ stubReset: true })

counter.n = 5
counter.$reset()
expect(counter.n).toBe(5)
})

it('can stub $reset calls in setup stores', () => {
const { counter } = factorySetupStore({ stubReset: true })

counter.n = 5
counter.$reset()
expect(counter.n).toBe(5)
})

it('executes plugins', () => {
const { counter, wrapper } = factory({
plugins: [() => ({ pluginN: 0 })],
Expand Down

0 comments on commit 025575d

Please sign in to comment.