Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `[expect]` Fix `objectContaining` to work recursively into sub-objects ([#10508](https://github.com/facebook/jest/pull/10508))
- `[jest-message-util]` Update to work properly with Node 15 ([#10660](https://github.com/facebook/jest/pull/10660))
- `[jest-mock]` Allow to mock methods in getters (TypeScript 3.9 export) ([#10156](https://github.com/facebook/jest/pull/10156))
- `[jest-config]` Fix for the `jest.config.ts` compiler to not interfere with `tsconfig.json` files
Comment thread
Gamote marked this conversation as resolved.
Outdated

### Chore & Maintenance

Expand Down
6 changes: 5 additions & 1 deletion packages/jest-config/src/readConfigFileAndSetRootDir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ const loadTSConfigFile = async (

// Register TypeScript compiler instance
try {
registerer = require('ts-node').register();
registerer = require('ts-node').register({
compilerOptions: {
module: 'CommonJS',
},
});
} catch (e) {
if (e.code === 'MODULE_NOT_FOUND') {
throw new Error(
Expand Down