diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 1c7653d3a57f..3ce6fcdbd443 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -646,7 +646,7 @@ export default function normalize( case 'haste': value = {...oldOptions[key]}; if (value.hasteImplModulePath != null) { - value.hasteImplModulePath = resolve(newOptions.resolver, { + const resolvedHasteImpl = resolve(newOptions.resolver, { filePath: replaceRootDirInPath( options.rootDir, value.hasteImplModulePath, @@ -654,6 +654,8 @@ export default function normalize( key: 'haste.hasteImplModulePath', rootDir: options.rootDir, }); + + value.hasteImplModulePath = resolvedHasteImpl || undefined; } break; case 'projects':