-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.ts
More file actions
42 lines (41 loc) · 1.06 KB
/
jest.config.ts
File metadata and controls
42 lines (41 loc) · 1.06 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
/* eslint-disable @typescript-eslint/no-require-imports */
import baseConfig from './base.jest.config.js';
export default {
...baseConfig,
rootDir: 'src',
testRegex: '.spec.ts$',
collectCoverage: true,
reporters: ['default'],
coverageThreshold: {
global: {
branches: 75,
functions: 89,
lines: 90,
statements: -12,
},
},
coveragePathIgnorePatterns: ['/node_modules/', '/integration-tests/'],
coverageDirectory: '../test-run-reports/coverage/unit',
transformIgnorePatterns: [
'/node_modules/(?!(@openmfp/portal-server-lib|graphql-request)/)',
],
transform: {
'^.+\\.(t|j)s$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
useESM: true,
},
],
},
testEnvironment: 'node',
passWithNoTests: true,
roots: ['<rootDir>'],
moduleNameMapper: {
'^@openmfp/portal-lib(|/.*)$': '<rootDir>/libs/portal-lib/src/$1',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
preset: 'ts-jest/presets/default-esm',
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: ['js', 'json', 'ts'],
};