From 0fc5376930202d28ff4fa5b94c6aae9eaa45b58f Mon Sep 17 00:00:00 2001 From: Szymon Rybczak Date: Thu, 2 Nov 2023 10:18:36 +0100 Subject: [PATCH] Revert "chore(e2e): check for undefined code before printing fail (#2061)" This reverts commit 2204d357379e2067cebe2791e90388f7e97fc5f5. --- jest/helpers.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jest/helpers.ts b/jest/helpers.ts index 20f1ed003..92dff03f4 100644 --- a/jest/helpers.ts +++ b/jest/helpers.ts @@ -186,11 +186,7 @@ function handleTestFailure( result: {[key: string]: any}, args: string[] | undefined, ) { - if ( - !options.expectedFailure && - result.code !== undefined && - result.code !== 0 - ) { + if (!options.expectedFailure && result.code !== 0) { console.log(`Running ${cmd} command failed for unexpected reason. Here's more info: ${chalk.bold('cmd:')} ${cmd} ${chalk.bold('options:')} ${JSON.stringify(options)}