@@ -3,19 +3,16 @@ import {
3
3
type ReactiveEffectRunner ,
4
4
TrackOpTypes ,
5
5
TriggerOpTypes ,
6
- computed ,
7
6
effect ,
8
7
markRaw ,
9
8
reactive ,
10
9
readonly ,
11
- ref ,
12
10
shallowReactive ,
13
11
stop ,
14
12
toRaw ,
15
13
} from '../src/index'
16
14
import { pauseScheduling , resetScheduling } from '../src/effect'
17
15
import { ITERATE_KEY , getDepFromReactive } from '../src/reactiveEffect'
18
- import { h , nextTick , nodeOps , render , serialize } from '@vue/runtime-test'
19
16
20
17
describe ( 'reactivity/effect' , ( ) => {
21
18
it ( 'should run the passed function once (wrapped by a effect)' , ( ) => {
@@ -1014,35 +1011,6 @@ describe('reactivity/effect', () => {
1014
1011
expect ( counterSpy ) . toHaveBeenCalledTimes ( 1 )
1015
1012
} )
1016
1013
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
-
1046
1014
describe ( 'empty dep cleanup' , ( ) => {
1047
1015
it ( 'should remove the dep when the effect is stopped' , ( ) => {
1048
1016
const obj = reactive ( { prop : 1 } )
0 commit comments