From 68059147ed828f5c48ba0af636f8cd1a5743cdc5 Mon Sep 17 00:00:00 2001 From: JayFate <48240828+JayFate@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:14:35 +0000 Subject: [PATCH 1/2] test: add setupVitest to tsconfig Signed-off-by: JayFate <48240828+JayFate@users.noreply.github.com> --- scripts/setupVitest.ts | 4 ++-- tsconfig.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/setupVitest.ts b/scripts/setupVitest.ts index 81a78d2985a..780fb42353c 100644 --- a/scripts/setupVitest.ts +++ b/scripts/setupVitest.ts @@ -1,4 +1,4 @@ -import { vi } from 'vitest' +import { vi, SpyInstance } from 'vitest' expect.extend({ toHaveBeenWarned(received: string) { @@ -65,7 +65,7 @@ expect.extend({ } }) -let warn +let warn: SpyInstance const asserted: Set = new Set() beforeEach(() => { diff --git a/tsconfig.json b/tsconfig.json index bbe12407bc1..e575f0c4c90 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -33,6 +33,7 @@ "packages/runtime-dom/types/jsx.d.ts", "packages/*/__tests__", "packages/dts-test", - "packages/vue/jsx-runtime" + "packages/vue/jsx-runtime", + "scripts/setupVitest.ts" ] } From 77371cb0a5a4a77a5232ecd924fc8d3f8e7295a2 Mon Sep 17 00:00:00 2001 From: pengjie <48240828+JayFate@users.noreply.github.com> Date: Mon, 3 Apr 2023 17:20:51 +0800 Subject: [PATCH 2/2] Update scripts/setupVitest.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲智子 Kevin Deng --- scripts/setupVitest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setupVitest.ts b/scripts/setupVitest.ts index 780fb42353c..c555b0fa5e8 100644 --- a/scripts/setupVitest.ts +++ b/scripts/setupVitest.ts @@ -1,4 +1,4 @@ -import { vi, SpyInstance } from 'vitest' +import { vi, type SpyInstance } from 'vitest' expect.extend({ toHaveBeenWarned(received: string) {