-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
node:test - when running node --test the output is not a tap-spec valid output #43046
Comments
@nodejs/test_runner |
The problem is the child process stdout and stderr yaml blocks. I commented out these two lines, and It can be reproduced without the CLI test runner as well as long as a yaml block contains a blank line: 'use strict';
const test = require('node:test');
const assert = require('node:assert');
test(() => assert.strictEqual(1, 2)); This outputs the following, which
|
uuh nice! I'm gonna take a look at it and open a PR 🤩 |
I'll also try to look at it |
I'm not convinced that this is a bug on our end. I think it may be a |
Regardless of where the bug originates, I think the solution should be the same as in this issue, parse child process tap output, then join it in to a unified tap output, instead of setting a YAML block with the child process output. @manekinekko has started implementing this, and I have suggested an alternative approach in the other issue. |
The TAP parser is in place now (not released yet though) and this seems to work better. I'm going to close this out. Thanks for reporting! |
Version
v18.1.0
Platform
Darwinx86_64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
only happens when using the flag
--test
What is the expected behavior?
What do you see instead?
Additional information
I'm willing to dive into this bug and fix it. I've spoken with @cjihrig and it seems like a confirmed bug
The text was updated successfully, but these errors were encountered: