Skip to content

Commit

Permalink
TINY-11177: Fixed issue where it was not clear test failures must be …
Browse files Browse the repository at this point in the history
…an empty rejected promise
  • Loading branch information
TheSpyder committed Sep 16, 2024
1 parent 7b0d367 commit 93d8408
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/runner/src/main/ts/runner/TestRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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);
Expand Down

0 comments on commit 93d8408

Please sign in to comment.