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)}