refactor(reactivity): simplify effect options

This commit is contained in:
Evan You
2019-10-30 11:11:23 -04:00
parent c6cbca25fe
commit 247c53672d
3 changed files with 17 additions and 22 deletions

View File

@@ -677,12 +677,13 @@ describe('reactivity/effect', () => {
})
it('events: onStop', () => {
const onStop = jest.fn()
const runner = effect(() => {}, {
onStop: jest.fn()
onStop
})
stop(runner)
expect(runner.onStop).toHaveBeenCalled()
expect(onStop).toHaveBeenCalled()
})
it('markNonReactive', () => {