diff --git a/packages/reactivity/__tests__/effect.spec.ts b/packages/reactivity/__tests__/effect.spec.ts index 650eda9c..ce8908e2 100644 --- a/packages/reactivity/__tests__/effect.spec.ts +++ b/packages/reactivity/__tests__/effect.spec.ts @@ -624,6 +624,15 @@ describe('reactivity/effect', () => { expect(dummy).toBe(3) }) + it('events: onStop', () => { + const runner = effect(() => {}, { + onStop: jest.fn() + }) + + stop(runner) + expect(runner.onStop).toHaveBeenCalled() + }) + it('markNonReactive', () => { const obj = reactive({ foo: markNonReactive({