-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
41 lines (40 loc) · 1 KB
/
jest.config.ts
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
import type { JestConfigWithTsJest } from 'ts-jest';
// @ts-ignore
import { compilerOptions } from './tsconfig';
export default async (): Promise<JestConfigWithTsJest> => {
return {
preset: 'ts-jest',
testPathIgnorePatterns: [
'/dist/',
'/dist_dev/',
],
testRegex: [
'(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$'
],
testEnvironment: 'node',
coveragePathIgnorePatterns: [
'/dist/',
'/dist_dev/',
'/node_modules/',
'/tests/'
],
coverageThreshold: {
'global': {
'branches': 90,
'functions': 95,
'lines': 95,
'statements': 95
}
},
collectCoverageFrom: [
'src/**/*.ts'
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'@international/(.*)': ['<rootDir>/src/international/$1'],
'@norway/(.*)': ['<rootDir>/src/countries/norway/$1'],
'@tests/(.*)': ['<rootDir>/tests/$1']
},
coverageDirectory: './coverage'
};
}