From 031179b569a0116020d17b5875bae08d5e685d3b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 27 Mar 2024 15:11:08 +0100 Subject: [PATCH] chore: rename `critical` to `isCritical` --- src/libs/E2E/reactNativeLaunchingTest.ts | 2 +- src/libs/E2E/types.ts | 2 +- tests/e2e/testRunner.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/E2E/reactNativeLaunchingTest.ts b/src/libs/E2E/reactNativeLaunchingTest.ts index 31faa803ec61..776e3de74f06 100644 --- a/src/libs/E2E/reactNativeLaunchingTest.ts +++ b/src/libs/E2E/reactNativeLaunchingTest.ts @@ -68,7 +68,7 @@ E2EClient.getTestConfig() return E2EClient.submitTestResults({ name: config.name, error: `Test '${config.name}' not found`, - critical: false, + isCritical: false, }); } diff --git a/src/libs/E2E/types.ts b/src/libs/E2E/types.ts index 3cb33e3bbce3..5cd6692c9215 100644 --- a/src/libs/E2E/types.ts +++ b/src/libs/E2E/types.ts @@ -43,7 +43,7 @@ type TestResult = { * Whether error is critical. If `true`, then server will be stopped and `e2e` tests will fail. Otherwise will simply log a warning. * Default value is `true` */ - critical?: boolean; + isCritical?: boolean; /** Render count */ renderCount?: number; diff --git a/tests/e2e/testRunner.ts b/tests/e2e/testRunner.ts index 8d898321309e..13a57312f355 100644 --- a/tests/e2e/testRunner.ts +++ b/tests/e2e/testRunner.ts @@ -93,12 +93,12 @@ const runTests = async (): Promise => { // Collect results while tests are being executed server.addTestResultListener((testResult) => { - const {critical = true} = testResult; + const {isCritical = true} = testResult; - if (testResult?.error != null && critical) { + if (testResult?.error != null && isCritical) { throw new Error(`Test '${testResult.name}' failed with error: ${testResult.error}`); } - if (testResult?.error != null && !critical) { + if (testResult?.error != null && !isCritical) { Logger.warn(`Test '${testResult.name}' failed with error: ${testResult.error}`); } let result = 0;