treeherder/jest.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 строки
926 B
JavaScript
Исходник Постоянная ссылка Обычный вид История

2022-05-18 00:15:20 +03:00
const path = require('path');
2022-05-17 18:44:06 +03:00
module.exports = {
2022-05-18 00:15:20 +03:00
rootDir: path.resolve(__dirname),
2022-05-17 18:44:06 +03:00
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)'],
2022-05-17 18:44:06 +03:00
setupFilesAfterEnv: ['<rootDir>/tests/ui/test-setup.js'],
testPathIgnorePatterns: ['tests/ui/integration'],
};