learning_ai_common_plat/services/platform-service/vitest.config.ts
saravanakumardb1 46ee14371c fix(ci): add --pool forks to all vitest test scripts to fix kill EPERM on Node v25
Root cause: tinypool worker teardown calls kill() which returns EPERM
in the act_runner host environment on Node.js v25.2.1. Tests pass but
the vitest process crashes during cleanup, causing CI failure.

Fix: --pool forks CLI flag on every package/service test script, plus
pool: 'forks' in all vitest.config.ts files. This uses child_process.fork()
worker management which handles termination cleanly.

60 package.json files updated, 10 vitest.config.ts files updated.
2026-03-27 23:23:38 -07:00

18 lines
450 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['src/**/*.test.ts'],
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',
},
},
});