From 5dd6d10a7a341ddf296dca4c655497943a1a96b9 Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Fri, 29 Nov 2024 03:27:08 +0800 Subject: [PATCH] chore: fix deprecated (#3234) * chore: fix deprecated * fix: vitest config --------- Co-authored-by: Kyrie Lin --- vitest.config.ts => vitest.config.mts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename vitest.config.ts => vitest.config.mts (90%) diff --git a/vitest.config.ts b/vitest.config.mts similarity index 90% rename from vitest.config.ts rename to vitest.config.mts index 0c80c9703d..0a8b4c426d 100644 --- a/vitest.config.ts +++ 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',