connor4312 / connor4312/nodejs-testing

Worker executed with code 1: undefined:1

Open
#68 1 comment 0 reactions 1 assignee Claimed by @connor4312 View on GitHub
bug
Dominant language
TypeScript
Stars
67
Forks
15
PR merge metrics
No merged PRs in 30d

Description

node --version v20.18.0
npm --version 10.8.2

I recently converted a project from jest to node:test. I can manually run all my tests in the terminal via `"test": "dotenvx run -f .env -f .env.test --overload -- node --no-warnings=ExperimentalWarning --test"` and there are no problems. However, when I attempt to do the same with the extension from vscode I get the below.

`{"jsonrpc":"2.0","id":1,"method":"start","params":{"verbose":false,"concurrency":10,"regenerateSnapshots":false,"files":[{"uri":"file:///Users/.test.js","path":"/Users/.test.js"},{"uri":"file:///Users/.test.js","path":"/Users/.test.js"},{"uri":"file:///Users/.test.js","path":"/Users/.test.js"},{"uri":"file:///Users/.test.js","path":"/Users/...`

I can't view the entire error log as it cuts off with the triple dot at the end. It seems to work if I run individual tests or modules but fails when I run everything at once. Here is my settings.json.

```
{
"nodejs-testing.envFile": "${workspaceFolder}/.env",
"nodejs-testing.include": [
"./__tests__"
],
"nodejs-testing.extensions": [
{
"extensions": [
"mjs",
"cjs",
"js"
],
"parameters": [
"--no-warnings=ExperimentalWarning"
]
},
],
"nodejs-testing.concurrency": 1
}
```

I added `"nodejs-testing.concurrency": 1` to see what would happen but then instead of the above error I get

`write EPIPE`

I think this means the extension is running out of memory and is unable to complete a full run. This may have to do with a large number of imported JSON files used in many of the tests like

`import input from "./docs/response.json" with { type: "json" };`

Seems with imports like the above I can only run so many tests (33/33 for example) before the rest runner crashes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.