From 6c544742a466e1583ca96a1809162a3d68e96b5a Mon Sep 17 00:00:00 2001 From: Gopalakrishna Palem Date: Sun, 21 Aug 2022 11:17:52 +0530 Subject: [PATCH] Fix for EISDIR #11135 Fix for issue https://github.com/facebook/jest/issues/11135 --- packages/jest-util/src/tryRealpath.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-util/src/tryRealpath.ts b/packages/jest-util/src/tryRealpath.ts index 0674c5e4cdf8..b5b1fcc68c2d 100644 --- a/packages/jest-util/src/tryRealpath.ts +++ b/packages/jest-util/src/tryRealpath.ts @@ -11,7 +11,7 @@ export default function tryRealpath(path: string): string { try { path = realpathSync.native(path); } catch (error: any) { - if (error.code !== 'ENOENT') { + if (error.code !== 'ENOENT' && error.code !== 'EISDIR') { throw error; } }