We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fcb801 commit d1764a1Copy full SHA for d1764a1
packages/reactivity/__tests__/computed.spec.ts
@@ -1013,16 +1013,9 @@ describe('reactivity/computed', () => {
1013
})
1014
1015
test('computed should remain live after losing all subscribers', () => {
1016
- const toggle = ref(true)
1017
- const state = reactive({
1018
- a: 1,
1019
- })
+ const state = reactive({ a: 1 })
1020
const p = computed(() => state.a + 1)
1021
- const pp = computed(() => {
1022
- return toggle.value ? p.value : 111
1023
1024
-
1025
- const { effect: e } = effect(() => pp.value)
+ const { effect: e } = effect(() => p.value)
1026
e.stop()
1027
1028
expect(p.value).toBe(2)
0 commit comments