40 lines
828 B
TypeScript
40 lines
828 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
globals: true,
|
|
include: ['tests/**/*.test.ts', '**/*.spec.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'dist/',
|
|
'coverage/',
|
|
'*.config.ts',
|
|
'*.config.js',
|
|
'src/vite-env.d.ts',
|
|
'src/providers/',
|
|
'src/types/index.ts',
|
|
'src/index.ts'
|
|
],
|
|
thresholds: {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80
|
|
}
|
|
},
|
|
setupFiles: ['./tests/setup.ts'],
|
|
testTimeout: 10000,
|
|
hookTimeout: 10000
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
}
|
|
});
|