Root cause: tinypool worker teardown calls kill() which returns EPERM on the act_runner host environment. Tests pass but the process crashes during cleanup, causing CI to report failure. pool: 'forks' uses child_process.fork() instead, avoiding the issue.
38 lines
850 B
TypeScript
38 lines
850 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
passWithNoTests: true,
|
|
pool: 'forks',
|
|
env: {
|
|
DB_PROVIDER: 'memory',
|
|
RATE_LIMIT_STORE_MODE: 'memory',
|
|
COSMOS_ENDPOINT: 'https://test.documents.azure.com:443/',
|
|
COSMOS_KEY: 'dGVzdC1rZXktZm9yLXZpdGVzdC1vbmx5',
|
|
JWT_SECRET: 'vitest-only-not-for-production',
|
|
},
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/**',
|
|
'dist/**',
|
|
'coverage/**',
|
|
'**/*.test.ts',
|
|
'**/*.config.*',
|
|
'**/index.ts',
|
|
],
|
|
thresholds: {
|
|
global: {
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80,
|
|
statements: 80,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|