-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.ts
46 lines (44 loc) · 1.17 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
42
43
44
45
46
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
import { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
maxWorkers: 1,
forceExit: true,
transform: {
'^.+\\.ts?$': [
'ts-jest',
{
useESM: true,
},
],
},
transformIgnorePatterns: ['/node_modules/(?!(@middy/core)/)'],
moduleNameMapper: {
'^@middy/core$': '<rootDir>/node_modules/@middy/core',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
collectCoverageFrom: ['./src/**'],
coveragePathIgnorePatterns: ['__test__', 'testUtils.ts'],
testMatch: ['**.test.ts'],
preset: '@shelf/jest-mongodb',
testTimeout: 30000,
watchPathIgnorePatterns: ['globalConfig'],
coverageThreshold: {
global: {
branches: 60,
functions: 40,
lines: 35,
statements: 35,
},
},
globalTeardown: './tearDown.cjs',
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json', 'node', 'd.ts'],
};
export default config;