Repository navigation
Fail the test run when a test fails - #185
Merged
Merged
Conversation
The test script ran mocha with --allow-uncaught, which turns a failing test into an uncaught error. After an asynchronous hook, mocha then stopped without reporting the failure or running the remaining tests, and exited with code 0, so CI passed.
CI report
Public API changes: Public API, No public API changeNo public API change. For a0c9b61, updated 2026-11-16 08:18 UTC. Each check's run page has its full log. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm testran mocha with--allow-uncaught. That option turns a failing test into an uncaught error, and after an asynchronous hook (most suites clear storage inbeforeEach) mocha then stopped: no failure was reported, the remaining test files did not run, and the exit code was 0, so CI passed.--allow-uncaught(before:mocha --timeout 180000 test/tests_*.js --exit --allow-uncaught, after: the same without the option). No test relies on it; the full suite passes the same way without it.test/tests_package.jsruns mocha with the options of the test script on a small suite that has an asynchronous hook and one failing test, and checks that the run reports the failure and exits with code 1. It fails with the old script.npm run coveragepasses locally (243 tests).