From 8a6a8f77a80570d0fc225885659a2b49c75df205 Mon Sep 17 00:00:00 2001 From: Huafu Gandon Date: Fri, 3 Aug 2018 09:51:03 +0200 Subject: [PATCH] fix: test rootDir to handle preset-angular --- src/utils/get-ts-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/get-ts-config.ts b/src/utils/get-ts-config.ts index 6c018303ed..27d6d54b91 100644 --- a/src/utils/get-ts-config.ts +++ b/src/utils/get-ts-config.ts @@ -109,7 +109,7 @@ function findTSConfigPath( `${jestConfig.rootDir}${sep}`, ); // ensure the path is resolved - if (!tsConfigFile.startsWith('/')) { + if (!tsConfigFile.startsWith('/') && jestConfig.rootDir) { tsConfigFile = resolve(jestConfig.rootDir, tsConfigFile); } else { tsConfigFile = resolve(tsConfigFile);