Skip to content

[v1.0.2] Fix Jest module resolution for modern TypeScript configs

Choose a tag to compare

@SherpadNdabambi SherpadNdabambi released this 19 Nov 16:37
· 29 commits to main since this release
515c538

Fixed

  1. Add moduleNameMapper in jest.config.ts to strip explicit .js extensions emitted by TypeScript when using moduleResolution: "bundler" or "node16"/"nodenext". This prevents "Cannot find module './foo.js'" errors when running tests with Jest.