-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
48 lines (47 loc) · 1.37 KB
/
jest.config.js
File metadata and controls
48 lines (47 loc) · 1.37 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
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
displayName: {
name: 'Evernorth Typescript Library: aws-lambda-ts-event-handler',
color: 'yellow',
},
runner: 'groups',
preset: 'ts-jest',
transform: {
'^.+\\.ts?$': 'ts-jest',
},
moduleFileExtensions: ['js', 'ts'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**'],
testMatch: ['**/?(*.)+(spec|test).ts'],
roots: ['src', 'tests'],
testPathIgnorePatterns: ['/node_modules/'],
testEnvironment: 'node',
coveragePathIgnorePatterns: [
'/node_modules/',
'src/helpers/TestServer.ts',
// '/types/',
],
coverageThreshold: {
global: {
statements: 85,
branches: 85,
functions: 85,
lines: 85,
},
},
coverageReporters: ['json-summary', 'text', 'lcov'],
// 'setupFiles': [
// '<rootDir>/tests/helpers/populateEnvironmentVariables.ts'
// ]
// Fix for GitHub Actions compatibility issue
resolver: undefined,
// Ensure consistent module resolution in different environments
moduleDirectories: ['node_modules'],
// Improve error reporting
verbose: true,
// Add GitHub Actions reporter when running in GitHub Actions
reporters: [
'default',
process.env.GITHUB_ACTIONS === 'true' ? 'github-actions' : null,
process.env.GITHUB_ACTIONS === 'true' ? 'summary' : null,
].filter(Boolean),
};