@mhy/config
Version:
> This documentation is not complete. It's in progress and it's a BETA version. Use the tool at your own risk.
34 lines (30 loc) • 1.17 kB
JavaScript
import path from 'path'
import { load, moduleHome } from '../'
require('../_utils/babelrc')(__dirname)
module.exports = load('jest', {
setupTestFrameworkScriptFile: path.resolve(moduleHome, 'jest/setup.js'),
roots: [path.resolve(process.cwd(), 'src')],
watchPathIgnorePatterns: ['__.*__'],
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'],
modulePaths: [
path.resolve(process.cwd(), 'src'),
path.resolve(process.cwd(), 'node_modules'),
path.resolve(__dirname, '../../node_modules'),
path.resolve(moduleHome, '../../../../', './node_modules')
],
transform: {
'^.+\\.[jt]sx?$': require.resolve('./preprocess')
},
transformIgnorePatterns: [],
bail: true,
testRegex: '\\.?(test|tests|spec|integration)\\.[jt]sx?$',
collectCoverage: false,
verbose: true,
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'identity-obj-proxy',
'\\.(s?css|less)$': 'identity-obj-proxy',
'\\.(svgx?)$': path.resolve(__dirname, 'mocks/react-null.js')
},
collectCoverageFrom: ['**/*.js']
})