Pass exit code through reporters to karma - #82
Open
ryanvall wants to merge 1 commit into
Open
Conversation
|
I can confirm latest karma-parallel still has the bug, and this pull-request do fixed the bug. Additional info: |
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.
testsdir aren't testing lib behaviorBug fix
Possibly related to #35, but
karma-paralleldoesn't appropriately exit with code 1 if coverage thresholds aren't met when this is used in conjunction withkarma-coverage. In this issue/subsequent PR support was added inkarma/karma-coverageto pass the exit code through in theonExitcallback:karma-runner/karma-coverage#418
karma-runner/karma#3541
karma-runner/karma-coverage@c93f061#diff-691854e392b02b6faf6147eef5d32e3bb9f187025dc025742167d4bdce7443feR286
The existing implementation of
onExitinkarma-paralleldoesn't pass along the returned values fromonExitin the individual reporters.The exit code is now passed through from the original reporters.
Possibly? Users might now have commands/CI builds fail because of coverage, but that would be correct/no longer a false positive. I don't know enough about karma/the reporter API to know if
onExitis only ever supposed to be passed an exit code, so if it can be passed other data/arguments this behavior wouldn't be entirely correct.I'm not 100% sure if this is the right solution - this wouldn't be an issue for anyone not utilizing a coverage reporter/coverage thresholds. Open to feedback on how to improve this.