From 1b522cae077265363a35d34fd0642678b7f57f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6=E8=BF=9C=E6=96=B9?= Date: Fri, 22 Dec 2023 21:55:43 +0800 Subject: [PATCH] chore(test): replace deprecated `SpyInstance` import with the latest `MockInstance` (#9889) --- packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts | 4 ++-- scripts/setupVitest.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts b/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts index 89ccf02bc..09542a355 100644 --- a/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts +++ b/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() }) diff --git a/scripts/setupVitest.ts b/scripts/setupVitest.ts index cd1e672fd..781e713e4 100644 --- a/scripts/setupVitest.ts +++ b/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 = new Set() beforeEach(() => {