Skip to content

Commit 14480fd

Browse files
committed
build(test): configure ts-jest to use correct tsconfig
I think *this* was why we were seeing weird flakiness around default exports on CI
1 parent 1fb05aa commit 14480fd

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

jest.config.js

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
const {jest: jestConfig} = require('./src/config')
1+
const {
2+
globals,
3+
transformIgnorePatterns,
4+
...config
5+
} = require('./src/config/jest.config')
26

3-
module.exports = Object.assign(jestConfig, {
7+
/** @type{import('ts-jest/dist/types').InitialOptionsTsJest} */
8+
module.exports = {
9+
...config,
410
roots: ['<rootDir>/src'],
511
coverageThreshold: null,
6-
})
12+
transformIgnorePatterns: [...transformIgnorePatterns, '.prettierrc.js'],
13+
globals: {
14+
'ts-jest': {
15+
...globals['ts-jest'],
16+
tsconfig: './src/tsconfig.json',
17+
diagnostics: {
18+
warnOnly: true,
19+
exclude: ['src/scripts/**/*.js', 'src/config/**/*.js'],
20+
},
21+
},
22+
},
23+
}

0 commit comments

Comments
 (0)