From c48dc3bb734f6fb3520dbd6608cf140b1e1b2c18 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 24 Feb 2019 16:52:51 +0100 Subject: [PATCH] set hasteImplModulePath to undefined, not null --- packages/jest-config/src/normalize.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 1ae2e08326b4..61dddcd7585c 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':