forked from danny-avila/agents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.mjs
More file actions
36 lines (32 loc) · 1.01 KB
/
jest.config.mjs
File metadata and controls
36 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// jest.config.mjs
import { pathsToModuleNameMapper } from 'ts-jest';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const tsconfig = require('./tsconfig.json');
const config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/src/**/*.test.ts', '**/src/**/*.spec.ts'],
moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {
prefix: '<rootDir>/'
}),
modulePaths: [
'<rootDir>'
],
verbose: true,
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironmentOptions: {
env: {
NODE_ENV: 'test'
}
},
// Limit concurrent test execution to avoid rate limits
maxWorkers: '50%',
maxConcurrency: 1,
// Timeout for tests — E2E summarization tests hit real APIs and need more time.
// Per-suite jest.setTimeout() calls can extend this further.
testTimeout: 60000, // 60 seconds
// Optional: run tests serially (one at a time) - uncomment if needed
// runInBand: true,
};
export default config;