From f32ec17131ac01bd52712c4ba7d615963d724f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6=E8=BF=9C=E6=96=B9?= Date: Thu, 26 Oct 2023 16:34:14 +0800 Subject: [PATCH] chore: remove unnecessary imports from vitest (#8562) --- packages/runtime-core/__tests__/apiOptions.spec.ts | 2 +- packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts | 2 +- packages/vue-compat/__tests__/global.spec.ts | 1 - packages/vue-compat/__tests__/instance.spec.ts | 2 +- scripts/setupVitest.ts | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/runtime-core/__tests__/apiOptions.spec.ts b/packages/runtime-core/__tests__/apiOptions.spec.ts index ca712e0d3ac..94f9db1b028 100644 --- a/packages/runtime-core/__tests__/apiOptions.spec.ts +++ b/packages/runtime-core/__tests__/apiOptions.spec.ts @@ -1,7 +1,7 @@ /** * @vitest-environment jsdom */ -import { vi, type Mock } from 'vitest' +import { type Mock } from 'vitest' import { h, nodeOps, diff --git a/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts b/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts index 9d2135a4070..89ccf02bc02 100644 --- a/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts +++ b/packages/runtime-dom/__tests__/customizedBuiltIn.spec.ts @@ -1,4 +1,4 @@ -import { vi, SpyInstance } from 'vitest' +import { type SpyInstance } from 'vitest' import { render, h } from '@vue/runtime-dom' describe('customized built-in elements support', () => { diff --git a/packages/vue-compat/__tests__/global.spec.ts b/packages/vue-compat/__tests__/global.spec.ts index d189d65f67b..ffbea39a354 100644 --- a/packages/vue-compat/__tests__/global.spec.ts +++ b/packages/vue-compat/__tests__/global.spec.ts @@ -1,4 +1,3 @@ -import { expect, vi } from 'vitest' import Vue from '@vue/compat' import { effect, isReactive } from '@vue/reactivity' import { h, nextTick } from '@vue/runtime-core' diff --git a/packages/vue-compat/__tests__/instance.spec.ts b/packages/vue-compat/__tests__/instance.spec.ts index abcd3d1fab0..009dc7aa6f5 100644 --- a/packages/vue-compat/__tests__/instance.spec.ts +++ b/packages/vue-compat/__tests__/instance.spec.ts @@ -1,4 +1,4 @@ -import { vi, Mock } from 'vitest' +import { type Mock } from 'vitest' import Vue from '@vue/compat' import { Slots } from '../../runtime-core/src/componentSlots' import { Text } from '../../runtime-core/src/vnode' diff --git a/scripts/setupVitest.ts b/scripts/setupVitest.ts index c555b0fa5e8..cd1e672fd28 100644 --- a/scripts/setupVitest.ts +++ b/scripts/setupVitest.ts @@ -1,4 +1,4 @@ -import { vi, type SpyInstance } from 'vitest' +import { type SpyInstance } from 'vitest' expect.extend({ toHaveBeenWarned(received: string) {