forked from eeegor/react-typescript-multi-step-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (41 loc) · 1 KB
/
Copy pathjest.config.js
File metadata and controls
41 lines (41 loc) · 1 KB
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
module.exports = {
transform: {
'^.+\\.ts(x)?$': 'ts-jest'
},
setupFiles: ['./test/setup-tests.ts'],
testRegex: '(src/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
coverageDirectory: "coverage",
coverageReporters: [
'lcov', // html report
'text' // report in console
],
collectCoverageFrom: [
'src/**/*.(jsx|tsx|js|ts)',
'!**/*._story.*',
'!**/*.story.*',
'!**/*.d.ts',
'!src/index.*'
],
// uncomment the following to make tests fail if coverage goals are not met
// coverageThreshold: {
// global: {
// branches: 80,
// functions: 80,
// statements: 80,
// line: 80
// }
// },
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node'
],
// static files are actually mocked
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/test/__mocks__/fileMock.js',
'\\.(css|scss)$': '<rootDir>/test/__mocks__/styleMock.js'
}
};