From 93d840862fed2f1a49b72f7e9ef48f612edf3029 Mon Sep 17 00:00:00 2001 From: Andrew Herron Date: Mon, 16 Sep 2024 12:45:32 +1000 Subject: [PATCH] TINY-11177: Fixed issue where it was not clear test failures must be an empty rejected promise --- modules/runner/src/main/ts/runner/TestRun.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/runner/src/main/ts/runner/TestRun.ts b/modules/runner/src/main/ts/runner/TestRun.ts index aa9bfc2e..5d1664b3 100644 --- a/modules/runner/src/main/ts/runner/TestRun.ts +++ b/modules/runner/src/main/ts/runner/TestRun.ts @@ -54,7 +54,8 @@ export const runTest = (test: Test, state: RunState, actions: RunActions, report console.error(e); report.fail(e); actions.onFailure(); - return Promise.reject(e); + // Test failures must be an empty reject, otherwise the error management thinks it's a bedrock error + return Promise.reject(); }; const skip = (report: TestReporter) => { @@ -75,6 +76,7 @@ export const runTest = (test: Test, state: RunState, actions: RunActions, report } else if (state.testCount > state.offset + state.chunk) { actions.runNextChunk(state.offset + state.chunk); // Reject so no other tests are run + // Test failures must be an empty reject, otherwise the error management thinks it's a bedrock error return Promise.reject(); } else { const report = reporter.test(test.file || 'Unknown', test.fullTitle(), state.totalTests);