nodejs-testing
nodejs-testing copied to clipboard
Error when running all tests
I have been using the Node.js test runner with a lot of tests in our project successfully via the Node.js CLI for some time, but experimenting with this extension today, it's unable to run all the tests via the VS Code Testing UI buttons for running all tests.
When running via the button "Run Tests", VS Code has a popup titled write EPIPE
with source node:test runner
, and no description:
The extension host output logs:
[error] Error: Cannot call write after a stream was destroyed
at new NodeError (node:internal/errors:405:5)
at _write (node:internal/streams/writable:324:11)
at Socket.Writable.write (node:internal/streams/writable:337:10)
at /Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:30:435
at new Promise (<anonymous>)
at e.write (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:30:398)
at e.sendNotification (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:17:9345)
at e.notify (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:17:20616)
at Object.a [as kill] (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:17:23453)
at /Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/extension.js:41:1153
at <anonymous>
at processTicksAndRejections (node:internal/process/task_queues:95:5)
When running the tests via the button "Debug Tests", the result is the same except the debug console outputs:
/Users/jaydenseric/.volta/bin/node ./../../.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/runner-worker.js /var/folders/k5/nwgbm9p13yv9phl38hs3p8gr0000gn/T/nodejs-test.16257-9.sock
Process exited with code 1
Uncaught SyntaxError SyntaxError: Expected double-quoted property name in JSON at position 8192 (line 1 column 8193)
at <anonymous> (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/runner-worker.js:16:31)
at emit (events:519:28)
at addChunk (internal/streams/readable:559:12)
at readableAddChunkPushByteMode (internal/streams/readable:510:3)
at Readable.push (internal/streams/readable:390:5)
at onStreamRead (internal/stream_base_commons:190:23)
at callbackTrampoline (internal/async_hooks:130:17)
--- PIPEWRAP ---
at init (internal/inspector_async_hook:25:19)
at emitInitNative (internal/async_hooks:202:43)
at Socket.connect (net:1238:7)
at connect (net:236:17)
at <anonymous> (/Users/jaydenseric/.vscode/extensions/connor4312.nodejs-testing-1.5.0/out/runner-worker.js:20:744)
at Module._compile (internal/modules/cjs/loader:1368:14)
at Module._extensions..js (internal/modules/cjs/loader:1426:10)
at Module.load (internal/modules/cjs/loader:1205:32)
at Module._load (internal/modules/cjs/loader:1021:12)
at executeUserEntryPoint (internal/modules/run_main:142:12)
at <anonymous> (internal/main/run_main_module:28:49)
If I run a specific test via the testing UI tree, or inline in a test module gutter, it is able to run. It seems to only have a problem with running all the tests not individually.
- VS Code v1.88.0 (Universal)
- Extension node:test runner v1.5.0
- Node.js v21.7.2
- TypeScript v5.4.4