19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
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'],
|
|
},
|
|
})
|