22 lines
506 B
TypeScript
22 lines
506 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
// tsconfig uses "jsx": "preserve" for Next; tests need esbuild to compile it
|
|
esbuild: {
|
|
jsx: 'automatic',
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
isolate: true,
|
|
exclude: ['e2e/**', 'node_modules/**'],
|
|
},
|
|
});
|