3.0.5
Reproduction linkhttps://jsfiddle.net/twgh75x4/4/
Steps to reproducetest case
it('watching multiple sources: computed', async () => { let count = 0 const _ref = ref('1') const _computed = computed(() => !!_ref.value) watch([_computed], () => { count.value++ }) watch(_computed, () => { count.value++ }) // When the _ref value changes // in factthe _computed value remains the same // watch should not be triggered _ref.value = '2' // count.value is 1, Is not the expected 0 await nextTick() _ref.value = '3' // count.value is 2, Is not the expected 0 await nextTick() expect(count).toBe(0) })What is expected?
experct(count).toBe(0)
What is actually happening?experct(count).toBe(2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4