-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (40 loc) · 1021 Bytes
/
jest.config.js
File metadata and controls
41 lines (40 loc) · 1021 Bytes
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
const buildLogFolder = 'buildlog';
module.exports = {
testURL: 'http://localhost/',
setupFiles: [
'<rootDir>/test/shim.js',
'<rootDir>/test/setup.js'
],
moduleFileExtensions: [
'ts',
'tsx',
'js'
],
transform: {
"^.+\\.(ts|tsx)$": "<rootDir>/test/preprocessor.js"
},
testRegex: '(app\/(.*)(spec|test).(tsx|ts))$',
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'\\.(css|less|scss)$': '<rootDir>/test/__mocks__/styles.js',
'^rootApp/(.*)': '<rootDir>/src/app/$1'
},
collectCoverageFrom: [
'**/app/**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/vendor/**',
'!**/app/index.tsx'
],
coverageDirectory: `${buildLogFolder}/coverage`,
reporters: [
'default',
['./node_modules/jest-html-reporter', {
pageTitle: 'Directly Trainning Test Report',
outputPath: `${buildLogFolder}/test-results.html`,
includeFailureMsg: true,
includeConsoleLog: true,
theme: 'darkTheme',
sort: 'status'
}]
]
};