Skip to content

Commit 4abe50e

Browse files
committed
cosmetic
1 parent 93ad955 commit 4abe50e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jest.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ const config = {
22
verbose: true,
33
testEnvironment: 'node',
44
testRegex: 'src/test/.*.test.mts',
5+
// Make Jest consider .mts files as if they were ES modules.
56
moduleFileExtensions: ['mts', 'mjs', 'js', 'ts'],
67
transform: {
78
'^.+\\.mts?$': [
89
'babel-jest',
910
{
11+
// We need special Babel settings for Jest plust we need it to be in
12+
// a CJS configuration file, otherwise old versions of Node will fail
13+
// to run Jest.
1014
configFile: './babel.config-jest.cjs',
1115
},
1216
],

0 commit comments

Comments
 (0)