Skip to content

Commit 9763230

Browse files
committed
test: enabled moduleNameMapper to drop extensions during imports to allow tests to import other test files
1 parent dd95a6f commit 9763230

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jest.config.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ const config = {
7575
'jest-extended/all',
7676
'<rootDir>/tests/setupAfterEnv.ts'
7777
],
78+
moduleNameMapper: {
79+
"^(\\.{1,2}/.*)\\.js$": "$1",
80+
},
7881
extensionsToTreatAsEsm: ['.ts', '.tsx', '.mts'],
7982
};
8083

0 commit comments

Comments
 (0)