chore(vitest): update vitest and related setup

This commit is contained in:
Justineo
2025-11-10 17:34:25 +08:00
committed by GU Yiling
parent 7180e5dca2
commit b30a1ab2b5
4 changed files with 208 additions and 722 deletions

View File

@@ -48,8 +48,8 @@
"@typescript-eslint/utils": "^8.39.1",
"@vercel/analytics": "^1.5.0",
"@vitejs/plugin-vue": "^6.0.1",
"@vitest/browser": "^3.2.4",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/browser-playwright": "^4.0.8",
"@vitest/coverage-v8": "^4.0.8",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.6.0",
"@vue/tsconfig": "^0.8.0",
@@ -72,8 +72,8 @@
"typescript": "^5.9.2",
"unplugin-raw": "^0.6.0",
"vite": "npm:rolldown-vite@latest",
"vitest": "^3.2.4",
"vitest-browser-vue": "^2.0.0",
"vitest": "^4.0.8",
"vitest-browser-vue": "^2.0.1",
"vue": "^3.5.18",
"vue-tsc": "^3.0.5"
},

918
pnpm-lock.yaml generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -11,4 +11,5 @@ vi.mock("echarts/core", () => createEChartsModule());
afterEach(() => {
cleanup();
resetDocumentBody();
vi.clearAllMocks();
});

View File

@@ -1,5 +1,6 @@
import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config";
import { playwright } from '@vitest/browser-playwright'
export default mergeConfig(
viteConfig,
@@ -18,7 +19,7 @@ export default mergeConfig(
},
browser: {
enabled: true,
provider: "playwright",
provider: playwright(),
headless: true,
instances: [
{