-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathjest.config.cjs
35 lines (35 loc) · 956 Bytes
/
jest.config.cjs
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
module.exports = {
displayName: {
name: 'Powertools for AWS Lambda (TypeScript) utility: PARAMETERS',
color: 'magenta',
},
runner: 'groups',
preset: 'ts-jest',
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.ts?$': 'ts-jest',
},
moduleFileExtensions: ['js', 'ts'],
collectCoverageFrom: ['**/src/**/*.ts', '!**/node_modules/**'],
testMatch: ['**/?(*.)+(spec|test).ts'],
roots: ['<rootDir>/src', '<rootDir>/tests'],
testPathIgnorePatterns: ['/node_modules/'],
testEnvironment: 'node',
coveragePathIgnorePatterns: [
'/node_modules/',
'/types/',
'/src/docs.ts', // this file is only used for documentation
],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
coverageReporters: ['json-summary', 'text', 'lcov'],
setupFiles: ['<rootDir>/tests/helpers/populateEnvironmentVariables.ts'],
};