mirror of
https://github.com/mdgriffith/elm-optimize-level-2.git
synced 2024-12-01 19:35:08 +03:00
22 lines
709 B
JavaScript
22 lines
709 B
JavaScript
function createJestConfig(_, rootDir = __dirname) {
|
|
const config = {
|
|
transform: {
|
|
'.(ts|tsx)$': require.resolve('ts-jest/dist'),
|
|
'.(js|jsx)$': require.resolve('babel-jest'),
|
|
},
|
|
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}'],
|
|
testMatch: ['<rootDir>/**/*.(spec|test).{ts,tsx,js,jsx}'],
|
|
testURL: 'http://localhost',
|
|
rootDir,
|
|
watchPlugins: [
|
|
require.resolve('jest-watch-typeahead/filename'),
|
|
require.resolve('jest-watch-typeahead/testname'),
|
|
],
|
|
};
|
|
return config;
|
|
}
|
|
|
|
module.exports = createJestConfig();
|