-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
executable file
·51 lines (50 loc) · 1.41 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
48
49
50
51
// {
// "roots": ["<rootDir>/src"],
// "moduleFileExtensions": ["js", "jsx"],
// "testEnvironment": "node",
// "moduleNameMapper": {
// "^@shared[/](.+)": "<rootDir>/src/components/shared/$1",
// "^.+\\.sass$": "identity-obj-proxy",
// "^.+\\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
// "<rootDir>/src/__mocks__/fileMock.js"
// }
// }
// eslint-disable
module.exports = {
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.(j|t)s?(x)',
'<rootDir>/src/**/?(*.)(spec|test).(j|t)s?(x)',
],
testEnvironment: 'jsdom',
testURL: 'http://localhost',
transform: {
'^.+\\.(js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': '<rootDir>/config/jest/typescriptTransform.js',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^.+\\.less$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|mjs|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|ts|tsx)$'],
moduleNameMapper: {
'^react-native$': 'react-native-web',
},
moduleFileExtensions: [
'web.ts',
'ts',
'web.tsx',
'tsx',
'web.js',
'js',
'web.jsx',
'jsx',
'json',
'node',
'mjs',
],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
},
},
};