refactor: expose runner on computed

This commit is contained in:
Evan You
2018-09-20 18:36:34 -04:00
parent fa9b3df5ab
commit 9b50a5abb9
3 changed files with 10 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
import { computed, observable, autorun } from '../src'
import { computed, observable, autorun, stop } from '../src'
describe('observer/computed', () => {
it('should return updated value', () => {
@@ -132,7 +132,7 @@ describe('observer/computed', () => {
expect(dummy).toBe(undefined)
value.foo = 1
expect(dummy).toBe(1)
cValue.stop()
stop(cValue.runner)
value.foo = 2
expect(dummy).toBe(1)
})