-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running tests with --test-coverage-branches
(same for lines|functions
) doesn't emit test:fail
when threshold isn't met
#54812
Comments
I'm able to reproduce. I'll have a look at this later today. FWIW the process does exit with code 1, however all the tests do pass. CC @nodejs/test_runner |
A |
Mmm, well, the CHANGELOG (not the docs, since they're not updated yet) says:
Considering that, it feels more like a |
|
See #54813 |
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - The test runner internals no longer change the process exit code. This may be important to run() users. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: #53867 Refs: #54812 PR-URL: #54851 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: #53867 Refs: #54812 PR-URL: #54851 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812 PR-URL: nodejs#54851 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit adds a new 'test:summary' event to the test runner's reporting interface. This new event serves two purposes: - In the future, the test runner internals will no longer need to change the process exit code. This may be important to run() users. Unfortunately, this is a breaking change, so it needs to be changed in a major version. - The reporting interface now has a single event that can identify passing or failing test runs. Refs: nodejs#53867 Refs: nodejs#54812 PR-URL: nodejs#54851 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Version
22.8.0
Platform
Subsystem
No response
What steps will reproduce the bug?
I'm running Node with the following options:
and calling an executable that calls the run method as by doc.
If a test fails, a
test:fail
event is properly emitted.If the coverage threshold is not met, I get a
message
from thetest:diagnostic
event likeError: 82.35% function coverage does not meet a threshold of 95%.
(I get the same on thestdout
). But notest:fail
event is emitted, which makes it harder to detect it.How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
test:fail
event should be emitted once coverage is not meetWhat do you see instead?
no
test:fail
event emittedAdditional information
same thing apply when using
--test-coverage-functions
or--test-coverage-lines
optionsThe text was updated successfully, but these errors were encountered: