From ff3da5f321bbfda63bd56dc71c887e4d5012f765 Mon Sep 17 00:00:00 2001 From: letwebdev Date: Thu, 29 Feb 2024 14:38:54 +0800 Subject: [PATCH] chore: auto-import `@vue/test-utils` --- .eslintrc-auto-import.json | 3 ++- auto-imports.d.ts | 3 +++ vite.config.ts | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index aa18a8e..682361e 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -329,6 +329,7 @@ "ToolboxComponent": true, "TooltipComponent": true, "graphic": true, - "use": true + "use": true, + "mount": true } } diff --git a/auto-imports.d.ts b/auto-imports.d.ts index c202c74..f4bf771 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -80,6 +80,7 @@ declare global { const mapStores: typeof import('pinia')['mapStores'] const mapWritableState: typeof import('pinia')['mapWritableState'] const markRaw: typeof import('vue')['markRaw'] + const mount: typeof import('@vue/test-utils')['mount'] const nextTick: typeof import('vue')['nextTick'] const onActivated: typeof import('vue')['onActivated'] const onBeforeMount: typeof import('vue')['onBeforeMount'] @@ -412,6 +413,7 @@ declare module 'vue' { readonly mapStores: UnwrapRef readonly mapWritableState: UnwrapRef readonly markRaw: UnwrapRef + readonly mount: UnwrapRef readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef @@ -736,6 +738,7 @@ declare module '@vue/runtime-core' { readonly mapStores: UnwrapRef readonly mapWritableState: UnwrapRef readonly markRaw: UnwrapRef + readonly mount: UnwrapRef readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef diff --git a/vite.config.ts b/vite.config.ts index e510022..49bde5a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,9 @@ export default defineConfig({ "@vueuse/core", "pinia", "vitest", + { + "@vue/test-utils": ["mount"], + }, { "echarts/core": ["use", "graphic"], "echarts/renderers": ["CanvasRenderer"],