From 97b127ef404647817673832739adbec2eabaeed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Best?= Date: Wed, 8 Jan 2025 14:39:46 +0100 Subject: [PATCH] chore: Fix env var access --- packages/e2e/shared/cypress.config.ts | 6 +++++- packages/e2e/shared/specs/render-count.cy.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/e2e/shared/cypress.config.ts b/packages/e2e/shared/cypress.config.ts index cbff8023..27382fdd 100644 --- a/packages/e2e/shared/cypress.config.ts +++ b/packages/e2e/shared/cypress.config.ts @@ -20,7 +20,11 @@ export function defineConfig(config: Config) { openMode: 0, runMode: process.env.CI ? 1 : 0 }, - ...config + ...config, + env: { + ...config.env, + CI: Boolean(process.env.CI) + } } }) } diff --git a/packages/e2e/shared/specs/render-count.cy.ts b/packages/e2e/shared/specs/render-count.cy.ts index 77391b99..1150d85c 100644 --- a/packages/e2e/shared/specs/render-count.cy.ts +++ b/packages/e2e/shared/specs/render-count.cy.ts @@ -43,7 +43,7 @@ export function testRenderCount({ it( `should render ${times(expected.mount)} on mount`, { - ...(process.env.CI ? { retries: 4 } : undefined) + ...(Cypress.env('CI') ? { retries: 4 } : undefined) }, () => { cy.visit(path, stubConsoleLog) @@ -54,7 +54,7 @@ export function testRenderCount({ it( `should then render ${times(expected.update)} on updates`, { - ...(process.env.CI ? { retries: 4 } : undefined) + ...(Cypress.env('CI') ? { retries: 4 } : undefined) }, () => { cy.visit(path, stubConsoleLog)