Skip to content

Commit

Permalink
build(test): configure ts-jest to use correct tsconfig
Browse files Browse the repository at this point in the history
I think *this* was why we were seeing weird flakiness around
default exports on CI
  • Loading branch information
jrolfs committed May 28, 2021
1 parent 1fb05aa commit 14480fd
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
const {jest: jestConfig} = require('./src/config')
const {
globals,
transformIgnorePatterns,
...config
} = require('./src/config/jest.config')

module.exports = Object.assign(jestConfig, {
/** @type{import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
...config,
roots: ['<rootDir>/src'],
coverageThreshold: null,
})
transformIgnorePatterns: [...transformIgnorePatterns, '.prettierrc.js'],
globals: {
'ts-jest': {
...globals['ts-jest'],
tsconfig: './src/tsconfig.json',
diagnostics: {
warnOnly: true,
exclude: ['src/scripts/**/*.js', 'src/config/**/*.js'],
},
},
},
}

0 comments on commit 14480fd

Please sign in to comment.