-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
test_runner: update output TAP format to follow TAP 14 specs #44040
Comments
I've given this task a try, and opened a pull request. Happy to solve any issues I've missed or is introduced. |
Thanks @anonrig 👍 |
/cc @nodejs/test_runner |
Why is this not planned? |
The current output is a valid TAP output and currently more parsers support it better than the proposed changed. |
Given that TAP 14 added better support for nested tests, it seems like a pretty critical thing to add. I agree outputting TAP 13 is a better default, but it still seems like something node should be allowing via an option, if it wants to be in the test runner business. |
I amm reopening - but I think this should only be changed once there is an appropriate support for this change from tap parsers/reporters |
FYI, the TAP parser from #43525 was designed initially based in TAP14. I have made changes to allow it to parse TAP13 (mainly for subtests). So I guess it should be able to handle valid TAP14 content. |
IMHO Adding --tap-version=14 to test runner would resolve this issue. I’m changing countries in a couple of days, and can look into this issue a week from now. |
Can someone assign this issue to me? |
Is this why userland reporters like i.e.
|
No. The output of the CLI runner should be nicer in the next release (v19.2.0) due to #43525 being merged. For example:
The |
I see the following output Subtest: top-level test 1
ok 1 - top-level test 1duration_ms: 0.0321595 Subtest: top-level test 2ok 2 - top-level test 2duration_ms: 0.0005513 |
I am closing this now as I don't think an issue is needed. |
What steps will reproduce the bug?
index.js
file with a few test cases:node index.js
(note:node --test index.js
gives an incorrect result)How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Even though the current output is syntactically valid TAP output. The expected output would be a TAP format that follows specs 14.
Note the version header
TAP version 14
(required by TAP14).What do you see instead?
We currently output the following format (removed diagnostics for readability):
Top-level tests are incorrectly output as subtests:
# Subtest: top-level test 1
and# Subtest: top-level test 2
Additional information
As a reference, using node-tap (v16.3.0) gives the following output:
Here is the diff:
Related: #43417 #43525
The text was updated successfully, but these errors were encountered: