-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (29 loc) · 993 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
// const { jsWithBabel: tsjPreset } = require('ts-jest/presets');
module.exports = {
"roots": [
"<rootDir>/src"
],
clearMocks: true,
coverageDirectory: "coverage",
/**
* If you comment this out, you will get error unexpected token with optional chaining because you are using babel in your project
* When using babel together with ts-jest in a project, you need to let ts-jest know about it
*/
globals: {
'ts-jest': {
babelConfig: true,
}
},
/**
* You can use jsWithBabel preset provided by ts-jest so you don't need to define transform here. The preset jsWithBabel
* will automatically define "^.+\\.jsx?$": "babel-jest" for you
*/
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.jsx?$": "babel-jest",
},
// Indicates whether each individual test should be reported during the run
verbose: true,
};