Pass exit code through reporters to karma #82
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.
tests
dir aren't testing lib behaviorBug fix
Possibly related to #35, but
karma-parallel
doesn'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-coverage
to pass the exit code through in theonExit
callback:karma-runner/karma-coverage#418
karma-runner/karma#3541
karma-runner/karma-coverage@c93f061#diff-691854e392b02b6faf6147eef5d32e3bb9f187025dc025742167d4bdce7443feR286
The existing implementation of
onExit
inkarma-parallel
doesn't pass along the returned values fromonExit
in 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
onExit
is 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.