@@ -3,19 +3,16 @@ import {
33 type ReactiveEffectRunner ,
44 TrackOpTypes ,
55 TriggerOpTypes ,
6- computed ,
76 effect ,
87 markRaw ,
98 reactive ,
109 readonly ,
11- ref ,
1210 shallowReactive ,
1311 stop ,
1412 toRaw ,
1513} from '../src/index'
1614import { pauseScheduling , resetScheduling } from '../src/effect'
1715import { ITERATE_KEY , getDepFromReactive } from '../src/reactiveEffect'
18- import { h , nextTick , nodeOps , render , serialize } from '@vue/runtime-test'
1916
2017describe ( 'reactivity/effect' , ( ) => {
2118 it ( 'should run the passed function once (wrapped by a effect)' , ( ) => {
@@ -1014,35 +1011,6 @@ describe('reactivity/effect', () => {
10141011 expect ( counterSpy ) . toHaveBeenCalledTimes ( 1 )
10151012 } )
10161013
1017- // #10082
1018- it ( 'should set dirtyLevel when effect is allowRecurse and is running' , async ( ) => {
1019- const s = ref ( 0 )
1020- const n = computed ( ( ) => s . value + 1 )
1021-
1022- const Child = {
1023- setup ( ) {
1024- s . value ++
1025- return ( ) => n . value
1026- } ,
1027- }
1028-
1029- const renderSpy = vi . fn ( )
1030- const Parent = {
1031- setup ( ) {
1032- return ( ) => {
1033- renderSpy ( )
1034- return [ n . value , h ( Child ) ]
1035- }
1036- } ,
1037- }
1038-
1039- const root = nodeOps . createElement ( 'div' )
1040- render ( h ( Parent ) , root )
1041- await nextTick ( )
1042- expect ( serialize ( root ) ) . toBe ( '<div>22</div>' )
1043- expect ( renderSpy ) . toHaveBeenCalledTimes ( 2 )
1044- } )
1045-
10461014 describe ( 'empty dep cleanup' , ( ) => {
10471015 it ( 'should remove the dep when the effect is stopped' , ( ) => {
10481016 const obj = reactive ( { prop : 1 } )
0 commit comments