mirror of
https://github.com/vee1e/workorder-desk.git
synced 2026-09-01 09:50:13 +00:00
Also fix two bugs the tests surfaced in the merged AI implementation: - agent-tool-call model made approval.summary/expiresAt conditionally required only when an approval subdocument is present, so blocked/error tool calls persist without a fake approval - agent.repo.createRun coerced empty-string session/user ids to null so autonomous triage runs (no session/user) no longer fail ObjectId casting
26 lines
No EOL
747 B
TypeScript
26 lines
No EOL
747 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
globals: false,
|
|
setupFiles: ['./tests/setup.ts'],
|
|
testTimeout: 30000,
|
|
hookTimeout: 60000,
|
|
// Test files share one database (dropDatabase per test). Run them
|
|
// sequentially so a real shared Mongo does not hit "database is being dropped".
|
|
fileParallelism: false,
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'lcov'],
|
|
include: ['src/**/*.ts'],
|
|
exclude: ['src/server.ts', 'src/worker.ts', 'src/scripts/**', 'src/types/**', 'src/config/logger.ts'],
|
|
thresholds: {
|
|
statements: 80,
|
|
branches: 70,
|
|
functions: 80,
|
|
lines: 80,
|
|
},
|
|
},
|
|
},
|
|
}); |