Skip to content

Worker executed with code 1: undefined:1 #68

@mohfpge

Description

@mohfpge

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions