28 lines
670 B
TypeScript
28 lines
670 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
const repoRoot = fileURLToPath(new URL('../..', import.meta.url));
|
|
const libRoot = fileURLToPath(new URL('../../src/lib', import.meta.url));
|
|
const setupFile = fileURLToPath(new URL('../../tests/unit/setup.ts', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
root: repoRoot,
|
|
resolve: {
|
|
alias: {
|
|
'@lib': libRoot,
|
|
},
|
|
},
|
|
server: {
|
|
fs: {
|
|
allow: [repoRoot],
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: [setupFile],
|
|
include: ['tests/unit/**/*.test.ts'],
|
|
exclude: ['tests/e2e/**/*', 'packages/**'],
|
|
},
|
|
});
|