You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
Always. Crashes as well when files is not empty.
What is the expected behavior? Why is that the expected behavior?
It shouldn't crash.
What do you see instead?
node:internal/test_runner/harness:45
throw err;
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object
at new NodeError (node:internal/errors:399:5)
at _write (node:internal/streams/writable:315:13)
at Writable.write (node:internal/streams/writable:337:10)
at TestsStream.ondata (node:internal/streams/readable:766:22)
at TestsStream.emit (node:events:513:28)
at Readable.read (node:internal/streams/readable:539:10)
at flow (node:internal/streams/readable:1023:34)
at resume_ (node:internal/streams/readable:1004:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ERR_INVALID_ARG_TYPE'
}
run returns a testsStream wich is a Readable in object mode,
meaning you cannot pipe it directly to stdout without transforming it.
this error is expected
Activity
[-]Test runner run method crashing on Windows[/-][+]Test runner run function crashing on Windows[/+]jeanbmar commentedon Mar 23, 2023
@cjihrig @nodejs/test_runner
jeanbmar commentedon Mar 23, 2023
Crashes on Linux too
MoLow commentedon Mar 23, 2023
runreturns atestsStreamwich is aReadablein object mode,meaning you cannot pipe it directly to stdout without transforming it.
this error is expected
jeanbmar commentedon Mar 23, 2023
@MoLow then why official docs shows this
jeanbmar commentedon Mar 23, 2023
And how are we supposed to parse the run output to generate something similar to
--test?jeanbmar commentedon Mar 23, 2023
#44241
MoLow commentedon Mar 23, 2023
I am reopening this for us to perform 2 action items:
runAPI, either by exposing the reporters or by adding an option torun[-]Test runner run function crashing on Windows[/-][+]Test runner run function crashing[/+]test_runner: expose reporter for use in run api
test_runner: expose reporter for use in run api
test_runner: expose reporter for use in run api
test_runner: expose reporter for use in run api
test_runner: expose reporter for use in run api