-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
52 lines (51 loc) · 1.5 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
moduleFileExtensions: [
"ts",
"tsx",
"js"
],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
snapshotSerializers: ["enzyme-to-json/serializer"],
preset: "ts-jest",
testMatch: [
"**/*.(test|spec).(ts|tsx)"
],
globals: {
"ts-jest": {
useBabelrc: true,
tsConfigFile: "tsconfig.jest.json"
}
},
coveragePathIgnorePatterns: [
"/node_modules/",
"enzyme.js",
"<rootDir>/e2eTesting/*",
],
testPathIgnorePatterns: [
"<rootDir>/e2eTesting/*",
],
setupTestFrameworkScriptFile: "<rootDir>/enzyme.js",
allowSyntheticDefaultImports: true,
esModuleInterop: true,
coverageReporters: [
"json",
"lcov",
"text",
"text-summary"
],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/mocks.js",
"\\.(css|less|scss)$": "<rootDir>/__mocks__/mocks.js",
'^@Pages/(.*)$': '<rootDir>/pages/$1',
'^@Layout/(.*)$': '<rootDir>/src/layout/$1',
'^@Store/(.*)$': '<rootDir>/src/store/$1',
'^@Service/(.*)$': '<rootDir>/src/service/$1',
'^@Reducers/(.*)$': '<rootDir>/src/reducers/$1',
'^@Component/(.*)$': '<rootDir>/src/component/$1',
'^src/component/(.*)$': '<rootDir>/src/component/$1',
'^src/svgs/(.*)$': '<rootDir>/src/svgs/$1',
'^src/(.*)$': '<rootDir>/src/$1',
}
};