nexstream-api / backend /vitest.config.js
circleci
deploy ccb248c
65fc551
Raw
History Blame Contribute Delete
1.35 kB
import { defineConfig } from 'vitest/config';
import path from 'path';
const baseExcludes = ['**/node_modules/**', '**/dist/**'];
const includeManual = process.env.VITEST_INCLUDE_MANUAL === '1';
export default defineConfig({
test: {
globals: true,
environment: 'node',
// vitest4 stopped auto-setting this; guards app boot
env: { NODE_ENV: 'test' },
setupFiles: ['./tests/setup.ts'],
testTimeout: 60000,
reporters: ['default', 'junit'],
outputFile: './test-results.xml',
exclude: includeManual
? baseExcludes
: [...baseExcludes, 'tests/manual/**', 'tests/lite/**'],
// avoid resource contention in android
pool: 'forks',
poolOptions: {
forks: {
singleFork: false,
minForks: 1,
maxForks: 1,
},
},
isolate: true,
sequence: {
concurrent: false,
},
fileParallelism: false,
maxConcurrency: 1,
alias: {
'@shared': path.resolve(__dirname, '../shared'),
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
reportsDirectory: './coverage',
thresholds: {
lines: 40,
functions: 40,
branches: 35,
statements: 40,
autoUpdate: false,
},
exclude: ['tests/**', 'eslint.config.js', 'vitest.config.js'],
},
},
});