mirror of
https://github.com/mdgriffith/elm-optimize-level-2.git
synced 2024-11-26 10:04:21 +03:00
c4972e720b
Jest was running both the test/xyz.ts version of the test files and the compiled dist/test/xyz.js version of the test. Removing this duplication also prevents the tests from failing.
21 lines
594 B
JavaScript
21 lines
594 B
JavaScript
function createJestConfig(_, rootDir = __dirname) {
|
|
const config = {
|
|
transform: {
|
|
'.(ts|tsx)$': 'ts-jest'
|
|
},
|
|
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
|
|
moduleFileExtensions: ['ts', 'js'],
|
|
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}'],
|
|
testMatch: ['<rootDir>/test/*.(spec|test).ts'],
|
|
testURL: 'http://localhost',
|
|
rootDir,
|
|
watchPlugins: [
|
|
require.resolve('jest-watch-typeahead/filename'),
|
|
require.resolve('jest-watch-typeahead/testname'),
|
|
],
|
|
};
|
|
return config;
|
|
}
|
|
|
|
module.exports = createJestConfig();
|