Proposal: always default test runner to use spec reporter #54540
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Aug 24, 2024 I'm +1, but I've never had a TAP parser in my pipeline so I don't really know if the impact is big.
- addedtest_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on Aug 24, 2024 The impact would be for people who want TAP output to pass
--test-reporter=tapwhen starting Node. I think that is pretty reasonable for a semver major change.EDIT: It's worth noting that while this changes a default, passing
--test-reporter=tapwould be backward compatible to all versions of Node since test reporters were introduced.Fixed by #54548
- added a commit that references this issue
on Aug 27, 2024 - added a commit that references this issue
on Aug 27, 2024 - added a commit that references this issue
on Aug 27, 2024
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
What is the problem this feature will solve?
The test runner currently uses the more human friendly spec reporter when a TTY output is detected. Otherwise, it defaults to generating TAP output. I think the cons of this behavior outweigh the pros.
In Node core, this would remove occurrences of nested TAP output which can cause issues like #54535. We also have a number of places throughout the codebase, such as the GitHub Actions config, where we force the spec reporter anyway.
In userland, it is a DX improvement (no more TAP output in CI runs). TAP output would still be available via the
--test-reporter=tapWhat is the feature you are proposing to solve the problem?
Make the default test runner reporter be spec.
Notes:
What alternatives have you considered?
No response