-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
47 lines (41 loc) · 1.03 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
module.exports = {
testMatch: [
"<rootDir>/src/**/*.{spec,test}.{js,jsx}"
],
transform: {
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.(gql|graphql)$': '<rootDir>/node_modules/jest-transform-graphql',
'^.+\\.(css|less)$': '<rootDir>/jest-transformer/css.js',
'^(?!.*\\.(js|jsx|css|less|gql|graphql)$)': '<rootDir>/jest-transformer/assets.js',
},
moduleNameMapper: {
'^.+\\.(css|less)$': 'identity-obj-proxy'
},
moduleFileExtensions: [
'js',
'json',
'jsx',
'node'
],
collectCoverageFrom: [
'<rootDir>/src/**/*.js',
// webpack configs
'!**/webpack/**/*.js',
// configs files
'!**/*.config.js',
// Third party codes
'!**/node_modules/**',
// Generated files (built files)
'!<rootDir>/**/build/**',
'!<rootDir>/**/dist/**',
// Jest files
'!<rootDir>/**/coverage/**',
'!<rootDir>/**/jest.config.js',
// Test.
'!**/__tests__/**',
'!**/__mocks__/**',
'!**/__data_mocks__/**',
'!**/__gql_mocks__/**',
'!**/__test_utils__/**',
],
};