This commit is contained in:
浅念
2026-08-27 16:11:49 +08:00
commit 2d8ef3d7bb
104 changed files with 20196 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitest/config'
// Separate from vite.config.ts so the dev/build config stays clean and the
// test-only jsdom environment + glob don't leak into `vite build`.
// We still reuse the same `@` alias for consistency with app code.
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
environment: 'jsdom',
globals: true,
include: ['src/**/__tests__/**/*.test.ts'],
},
})