From de8dd6c93850b3225e13004f10277cc7d9532778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Wed, 27 Nov 2024 23:10:44 +0800 Subject: [PATCH 1/2] chore: fix deprecated --- vitest.config.ts => vitest.config.mts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vitest.config.ts => vitest.config.mts (100%) diff --git a/vitest.config.ts b/vitest.config.mts similarity index 100% rename from vitest.config.ts rename to vitest.config.mts From 97957736dd4d8d6469b2a289d9b235d2ac19264b Mon Sep 17 00:00:00 2001 From: Kyrie Lin Date: Thu, 28 Nov 2024 11:22:04 -0800 Subject: [PATCH 2/2] fix: vitest config --- vitest.config.mts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vitest.config.mts b/vitest.config.mts index 0c80c9703d..0a8b4c426d 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,6 +1,6 @@ import path from 'path'; import { defineConfig } from 'vitest/config'; -import { InlineConfig } from 'vitest'; +import { InlineConfig } from 'vitest/node'; // 单元测试相关配置 const testConfig: InlineConfig = { @@ -11,8 +11,8 @@ const testConfig: InlineConfig = { globals: true, environment: 'jsdom', testTimeout: 16000, - transformMode: { - web: [/\.[jt]sx$/], + testTransformMode: { + web: ['\\.[jt]sx$'], }, coverage: { provider: 'istanbul',