Skip to content

Commit 025575d

Browse files
committed
test: stubReset option
1 parent 5f526a3 commit 025575d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/testing/src/testing.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,22 @@ describe('Testing', () => {
161161
expect(counter.n).toBe(0)
162162
})
163163

164+
it('can stub $reset calls in option stores', () => {
165+
const { counter } = factory({ stubReset: true })
166+
167+
counter.n = 5
168+
counter.$reset()
169+
expect(counter.n).toBe(5)
170+
})
171+
172+
it('can stub $reset calls in setup stores', () => {
173+
const { counter } = factorySetupStore({ stubReset: true })
174+
175+
counter.n = 5
176+
counter.$reset()
177+
expect(counter.n).toBe(5)
178+
})
179+
164180
it('executes plugins', () => {
165181
const { counter, wrapper } = factory({
166182
plugins: [() => ({ pluginN: 0 })],

0 commit comments

Comments
 (0)