test(reactivity): 100% reactivity coverage (#1299)

This commit is contained in:
蜗牛老湿
2020-06-12 04:55:56 +08:00
committed by GitHub
parent 3fafc3b3ac
commit 426803046f
3 changed files with 17 additions and 0 deletions

View File

@@ -277,6 +277,12 @@ describe('reactivity/ref', () => {
expect(dummyY).toBe(5)
})
test('toRefs pass a reactivity object', () => {
console.warn = jest.fn()
const obj = { x: 1 }
toRefs(obj)
expect(console.warn).toBeCalled()
})
test('customRef', () => {
let value = 1
let _trigger: () => void