File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
packages/reactivity/__tests__ Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -259,13 +259,13 @@ describe('reactivity/computed', () => {
259
259
const onTrigger = vi . fn ( ( e : DebuggerEvent ) => {
260
260
events . push ( e )
261
261
} )
262
- const obj = reactive ( { foo : 1 } )
262
+ const obj = reactive < { foo ?: number } > ( { foo : 1 } )
263
263
const c = computed ( ( ) => obj . foo , { onTrigger } )
264
264
265
265
// computed won't trigger compute until accessed
266
266
c . value
267
267
268
- obj . foo ++
268
+ obj . foo ! ++
269
269
expect ( c . value ) . toBe ( 2 )
270
270
expect ( onTrigger ) . toHaveBeenCalledTimes ( 1 )
271
271
expect ( events [ 0 ] ) . toEqual ( {
@@ -277,7 +277,6 @@ describe('reactivity/computed', () => {
277
277
newValue : 2
278
278
} )
279
279
280
- // @ts -ignore
281
280
delete obj . foo
282
281
expect ( c . value ) . toBeUndefined ( )
283
282
expect ( onTrigger ) . toHaveBeenCalledTimes ( 2 )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ describe('reactivity/reactive', () => {
23
23
const reactiveObj = reactive ( obj )
24
24
expect ( isReactive ( reactiveObj ) ) . toBe ( true )
25
25
// read prop of reactiveObject will cause reactiveObj[prop] to be reactive
26
- // @ts -ignore
26
+ // @ts -expect-error
27
27
const prototype = reactiveObj [ '__proto__' ]
28
28
const otherObj = { data : [ 'a' ] }
29
29
expect ( isReactive ( otherObj ) ) . toBe ( false )
@@ -204,7 +204,7 @@ describe('reactivity/reactive', () => {
204
204
const dummy = computed ( ( ) => observed . a )
205
205
expect ( dummy . value ) . toBe ( 0 )
206
206
207
- // @ts -ignore
207
+ // @ts -expect-error
208
208
observed . a = bar
209
209
expect ( dummy . value ) . toBe ( 1 )
210
210
You can’t perform that action at this time.
0 commit comments