Skip to content

Commit b5527a1

Browse files
committed
Revert "chore: add test for effect() on-demand trigger"
This reverts commit 998c400.
1 parent 998c400 commit b5527a1

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

packages/reactivity/__tests__/computed.spec.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -313,34 +313,6 @@ describe('reactivity/computed', () => {
313313
expect(hourSpy).toHaveBeenCalledTimes(17)
314314
})
315315

316-
it('effect callback on-demand trigger', () => {
317-
const minSpy = vi.fn()
318-
const hourSpy = vi.fn()
319-
const effectSpy = vi.fn()
320-
321-
const sec = ref(0)
322-
const min = computed(() => {
323-
minSpy()
324-
return Math.floor(sec.value / 60)
325-
})
326-
const hour = computed(() => {
327-
hourSpy()
328-
return Math.floor(min.value / 60)
329-
})
330-
331-
effect(() => {
332-
effectSpy()
333-
min.value
334-
hour.value
335-
})
336-
337-
for (sec.value = 0; sec.value < 1000; sec.value++) {}
338-
339-
expect(minSpy).toHaveBeenCalledTimes(1001)
340-
expect(hourSpy).toHaveBeenCalledTimes(17)
341-
expect(effectSpy).toHaveBeenCalledTimes(1001)
342-
})
343-
344316
it('chained computed value urgent assessment edge case', () => {
345317
const cSpy = vi.fn()
346318

0 commit comments

Comments
 (0)