From 7e47fdcfa1c89becfe88d3f4568dd6a622b50d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Fri, 28 Oct 2022 17:10:43 +0200 Subject: [PATCH] chore(linter): allow cache override for manual jest runs (#12879) --- packages/workspace/src/utils/runtime-lint-utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/workspace/src/utils/runtime-lint-utils.ts b/packages/workspace/src/utils/runtime-lint-utils.ts index 19fadba431..e4fae64f86 100644 --- a/packages/workspace/src/utils/runtime-lint-utils.ts +++ b/packages/workspace/src/utils/runtime-lint-utils.ts @@ -376,11 +376,13 @@ export function mapProjectGraphFiles( } const ESLINT_REGEX = /node_modules.*[\/\\]eslint$/; +const JEST_REGEX = /node_modules\/.bin\/jest$/; // when we run unit tests in jest const NRWL_CLI_REGEX = /nx[\/\\]bin[\/\\]run-executor\.js$/; export function isTerminalRun(): boolean { return ( process.argv.length > 1 && (!!process.argv[1].match(NRWL_CLI_REGEX) || + !!process.argv[1].match(JEST_REGEX) || !!process.argv[1].match(ESLINT_REGEX)) ); }