forked from Hazyzh/jest-html-reporters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (35 loc) · 888 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
32
33
34
35
// jest.config.js
module.exports = {
verbose: true,
globals: {
'NODE_ENV': 'test'
},
moduleDirectories: [
'node_modules',
],
moduleNameMapper: {
'assets/images/.+?\\.svg$': '<rootDir>/test/__mocks__/svgMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ogg)$': '<rootDir>/test/__mocks__/fileMock.js',
'\\.(css|less|scss)$': '<rootDir>/test/__mocks__/styleMock.js',
'^@\/(.*)$': '<rootDir>/src/$1'
},
transform: {
'^.+\\.js$': 'babel-jest'
},
reporters: [
'default',
['<rootDir>/index.js', {
'publicPath': './html-report',
'filename': 'report.html',
}]
// '<rootDir>/index.dev.js',
],
collectCoverageFrom: [
'<rootDir>/src/*.{js,jsx}'
],
testURL: 'http://localhost/',
setupFiles: [
'<rootDir>/test/setup.js'
],
setupFilesAfterEnv: ['jest-enzyme']
}