File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
packages/runtime-core/__tests__ Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -1206,27 +1206,6 @@ describe('api: watch', () => {
1206
1206
expect ( countW ) . toBe ( 2 )
1207
1207
} )
1208
1208
1209
- test ( 'should not trigger if computed value did not change' , ( ) => {
1210
- const src = ref ( 0 )
1211
- const c = computed ( ( ) => src . value % 2 )
1212
- const spy = vi . fn ( )
1213
- watchEffect (
1214
- ( ) => {
1215
- spy ( c . value )
1216
- } ,
1217
- { flush : 'sync' }
1218
- )
1219
- expect ( spy ) . toHaveBeenCalledTimes ( 1 )
1220
- src . value = 2
1221
-
1222
- // should not trigger
1223
- expect ( spy ) . toHaveBeenCalledTimes ( 1 )
1224
-
1225
- src . value = 3
1226
- // should trigger because latest value changes
1227
- expect ( spy ) . toHaveBeenCalledTimes ( 2 )
1228
- } )
1229
-
1230
1209
const options = [
1231
1210
{ name : 'only trigger once watch' } ,
1232
1211
{
You can’t perform that action at this time.
0 commit comments