From 7d5fd5cff6b0c73480381979ecf224b03bfd23e4 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 7 Jul 2021 11:41:34 +0200 Subject: [PATCH] Prettify code --- client/cypress/support/commands.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/client/cypress/support/commands.js b/client/cypress/support/commands.js index fff6bf2e..e2cb5bd8 100644 --- a/client/cypress/support/commands.js +++ b/client/cypress/support/commands.js @@ -191,12 +191,7 @@ Cypress.Commands.add('fakeLogin', () => { }); Cypress.Commands.add('canReopen', (exists) => { - let check; - if (exists) { - check = 'exist'; - } else { - check = 'not.exist'; - } + let check = exists ? 'exist' : 'not.exist'; cy.getByDataCy('final-submission-reopen').should(check); });