File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 45
45
"build:types" : " rimraf temp && tsc --declaration --emitDeclarationOnly --outDir temp && api-extractor run && api-extractor run -c packages/compiler-sfc/api-extractor.json" ,
46
46
"test" : " npm run ts-check && npm run test:types && npm run test:unit && npm run test:e2e && npm run test:ssr && npm run test:sfc" ,
47
47
"test:unit" : " vitest run test/unit" ,
48
+ "test:watch" : " vitest run test/unit/features/v3/apiWatch.spec.ts" ,
48
49
"test:ssr" : " npm run build:ssr && vitest run server-renderer" ,
49
50
"test:sfc" : " vitest run compiler-sfc" ,
50
51
"test:e2e" : " npm run build -- full-prod,server-renderer-basic && vitest run test/e2e" ,
Original file line number Diff line number Diff line change @@ -1200,4 +1200,15 @@ describe('api: watch', () => {
1200
1200
expect ( parentSpy ) . toHaveBeenCalledTimes ( 1 )
1201
1201
expect ( childSpy ) . toHaveBeenCalledTimes ( 1 )
1202
1202
} )
1203
+
1204
+ // #12967
1205
+ test ( 'trigger when adding new property with Vue.set' , async ( ) => {
1206
+ const spy = vi . fn ( )
1207
+ const r = reactive ( { exist : 5 } )
1208
+ watch ( r , spy , { deep : true } )
1209
+ set ( r , 'add' , 1 )
1210
+
1211
+ await nextTick ( )
1212
+ expect ( spy ) . toHaveBeenCalledTimes ( 1 )
1213
+ } )
1203
1214
} )
You can’t perform that action at this time.
0 commit comments