Read the run counts node:test writes - #137
Merged
estebanzimanyi merged 1 commit intoSep 8, 2026
Merged
Conversation
`node --test` is the sixth dialect, and it differs from the other five in counting the tests that never ran in TWO places. A run of two passing, one skipped and one deferred prints `tests 4`, `pass 2`, `skipped 1`, `todo 1`: the two not-run counters are disjoint from `pass` and from each other, so a reader watching `skipped` alone certifies a suite whose every remaining test is deferred. Node prints a deferred test with a tick, which is the "reads as a pass" shape this tool exists to refuse, so both counters sum into the skip count. It is read before pytest for the reason Catch2 is: a log carries whatever else the job printed, and a phrase shaped like pytest's summary sitting beside node's counters would otherwise decide the total. A test holds that order. Every string in the three new tests is copied from a real `node --test` run. Against one, the tool reads `total=4 skipped=2` and exits 1 naming two skipped tests; against a clean run it reads `total=2 skipped=0` and exits 0. 21 tests pass.
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.
node --testis the sixth dialect, and it differs from the other five incounting the tests that never ran in TWO places. A run of two passing, one
skipped and one deferred prints
tests 4,pass 2,skipped 1,todo 1: thetwo not-run counters are disjoint from
passand from each other, so a readerwatching
skippedalone certifies a suite whose every remaining test isdeferred. Node prints a deferred test with a tick, which is the "reads as a
pass" shape this tool exists to refuse, so both counters sum into the skip
count.
It is read before pytest for the reason Catch2 is: a log carries whatever else
the job printed, and a phrase shaped like pytest's summary sitting beside node's
counters would otherwise decide the total. A test holds that order.
Every string in the three new tests is copied from a real
node --testrun.Against one, the tool reads
total=4 skipped=2and exits 1 naming two skippedtests; against a clean run it reads
total=2 skipped=0and exits 0. 21 testspass.