Skip to content

Commit

Permalink
Merge pull request #39062 from margelo/chore/critical-to-is-critical-…
Browse files Browse the repository at this point in the history
…rename

[NoQA] chore: rename `critical` to `isCritical`
  • Loading branch information
mountiny authored Mar 27, 2024
2 parents 5d554e3 + 031179b commit abb0304
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libs/E2E/reactNativeLaunchingTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ E2EClient.getTestConfig()
return E2EClient.submitTestResults({
name: config.name,
error: `Test '${config.name}' not found`,
critical: false,
isCritical: false,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/E2E/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/testRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ const runTests = async (): Promise<void> => {

// 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;
Expand Down

0 comments on commit abb0304

Please sign in to comment.