JEST_RELATIVE_JS_IMPORT_MAPPER
Maps a relative import written with a .js extension onto the path without an extension, which jest resolves.
A project compiled with module: nodenext writes ./foo.js for ./foo.ts, and so does TypeScript itself when rewriteRelativeImportExtensions turns a ./foo.ts import into ./foo.js. Jest looks for a file literally named foo.js and fails with Cannot find module './foo.js', so the extension is removed and jest’s own moduleFileExtensions search finds foo.ts.
Import:
import { JEST_RELATIVE_JS_IMPORT_MAPPER } from '@mnaoumov/typescript-dev-toolkit/test-runners/jest-config';Signature:
const JEST_RELATIVE_JS_IMPORT_MAPPER: Readonly<Record<string, string>>