Просмотр исходного кода

chore(test): replace deprecated `SpyInstance` import with the latest `MockInstance` (#9889)

丶远方 2 лет назад
Родитель
Сommit
1b522cae07

+ 2 - 2
packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts

@@ -1,8 +1,8 @@
-import { type SpyInstance } from 'vitest'
+import { type MockInstance } from 'vitest'
 import { render, h } from '@vue/runtime-dom'
 
 describe('customized built-in elements support', () => {
-  let createElement: SpyInstance
+  let createElement: MockInstance
   afterEach(() => {
     createElement.mockRestore()
   })

+ 2 - 2
scripts/setupVitest.ts

@@ -1,4 +1,4 @@
-import { type SpyInstance } from 'vitest'
+import { type MockInstance } from 'vitest'
 
 expect.extend({
   toHaveBeenWarned(received: string) {
@@ -65,7 +65,7 @@ expect.extend({
   }
 })
 
-let warn: SpyInstance
+let warn: MockInstance
 const asserted: Set<string> = new Set()
 
 beforeEach(() => {