From: 丶远方 Date: Fri, 22 Dec 2023 13:55:43 +0000 (+0800) Subject: chore(test): replace deprecated `SpyInstance` import with the latest `MockInstance... X-Git-Tag: v3.4.0-rc.1~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b522cae077265363a35d34fd0642678b7f57f51;p=thirdparty%2Fvuejs%2Fcore.git chore(test): replace deprecated `SpyInstance` import with the latest `MockInstance` (#9889) --- diff --git a/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts b/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts index 89ccf02bc0..09542a3555 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 cd1e672fd2..781e713e4c 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(() => {