-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathjest.config.js
31 lines (31 loc) · 905 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
module.exports = {
collectCoverageFrom: ['src/**/*.{js,jsx,mjs}'],
setupFiles: ['<rootDir>/config/polyfills.js'],
setupTestFrameworkScriptFile: '<rootDir>/src/setupTests.js',
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}',
'<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}',
],
testEnvironment: 'node',
testURL: 'http://localhost',
transform: {
'^.+\\.(js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|mjs|css|json)$)':
'<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'],
moduleNameMapper: {
'^react-native$': 'react-native-web',
'\\.(css|less)$': 'identity-obj-proxy',
},
moduleFileExtensions: [
'web.js',
'js',
'json',
'web.jsx',
'jsx',
'node',
'mjs',
],
};