forked from mozilla/treeherder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
24 lines (23 loc) · 926 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
const path = require('path');
module.exports = {
rootDir: path.resolve(__dirname),
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['web.jsx', 'web.js', 'wasm', 'jsx', 'js', 'json'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/jest/file-mock.js',
'\\.(css|less|sass|scss)$': '<rootDir>/tests/jest/style-mock.js',
'^react-native$': '<rootDir>/node_modules/react-native-web',
},
bail: true,
collectCoverageFrom: ['ui/**/*.{mjs,jsx,js}'],
testEnvironment: 'jsdom',
testRegex: 'ui/.*(_test|_spec|\\.test|\\.spec)\\.(mjs|jsx|js)$',
verbose: true,
transform: {
'\\.(mjs|jsx|js)$': 'babel-jest',
},
transformIgnorePatterns: ['node_modules/(!taskcluster-client-web|!@mozilla)'],
setupFilesAfterEnv: ['<rootDir>/tests/ui/test-setup.js'],
testPathIgnorePatterns: ['tests/ui/integration'],
};