20 lines
525 B
TypeScript
20 lines
525 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
|
|
import viteConfig from './vite.config';
|
|
|
|
export default mergeConfig(
|
|
await viteConfig({
|
|
command: 'build',
|
|
mode: 'test',
|
|
}),
|
|
defineConfig({
|
|
test: {
|
|
include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
environment: 'happy-dom',
|
|
exclude: [...configDefaults.exclude, 'e2e/**'],
|
|
root: fileURLToPath(new URL('./', import.meta.url)),
|
|
teardownTimeout: 5000,
|
|
},
|
|
}),
|
|
);
|