From 7008d60b9a42eb1e52d207b9b48029cf68db649e Mon Sep 17 00:00:00 2001 From: Sojin <77185816+SojinSamuel@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:55:41 +0530 Subject: [PATCH] Replaced conditional Operator The conditional operator was replaced with a short circuit evaluation, which avoids side effects or performance hits of the second operand --- scripts/run-cypress-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-cypress-tests.js b/scripts/run-cypress-tests.js index 1d80806..93ba772 100644 --- a/scripts/run-cypress-tests.js +++ b/scripts/run-cypress-tests.js @@ -3,5 +3,5 @@ const server = require('./start-server'); cypress.run().then(({ failures }) => { server.close(); - process.exit(failures === 0 ? 0 : 1); + process.exit(failures === 0 && 0 || 1); });