@bestcodetools/jest-tsconfig-paths-mapper
Version:
A utility library for generating Jest's moduleNameMapper based on TypeScript's tsconfig.json path mappings.
9 lines (8 loc) • 439 B
TypeScript
declare module 'tsconfig-jest-mapper' {
/**
* Generates Jest's `moduleNameMapper` based on TypeScript's `tsconfig.json` path mappings.
* @param tsconfigPath The path to the custom `tsconfig.json` file. If not provided, the default path ('tsconfig.json') will be used.
* @returns An object representing Jest's `moduleNameMapper`.
*/
export function generateModuleNameMapper(tsconfigPath?: string): Record<string, string>;
}