-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
jest.config.js
31 lines (27 loc) · 843 Bytes
/
jest.config.js
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
// jest.config.js
/*
How to install:
npm install --save-dev jest ts-jest @types/jest eslint-plugin-jest
Add package.json scripts:
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test:verbose": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose",
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
*/
export default {
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
},
],
},
transformIgnorePatterns: ['/node_modules/'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/frontend/'],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/', '/frontend/', '/src/mock/'],
};