Skip to content

πŸ› Bug Report β€” Error running many testsΒ #5507

@samuelcolvin

Description

@samuelcolvin

I get the following error when running tests locally (unfortunately the codebase is closed source):

TypeError: fetch failed
 ❯ fetch ../node_modules/undici/index.js:124:13
 ❯ process.processTicksAndRejections node:internal/process/task_queues:105:5
 ❯ MessagePort.<anonymous> [worker eval]:28:22

Caused by: Error: connect EADDRNOTAVAIL 127.0.0.1:53353 - Local (0.0.0.0:0)
 ❯ internalConnect node:net:1110:16
 ❯ defaultTriggerAsyncIdScope node:internal/async_hooks:472:18
 ❯ node:net:1356:9
 ❯ process.processTicksAndRejections node:internal/process/task_queues:85:11

I see it at the end, when all tests have passed.

I don't get this:

  • in github actions (with the same setup otherwise)
  • when running tests for each file independently
  • with singleWorker: true

But when running locally with just npm run test or CI=1 npm run test I get this 100% of the time.

Test output when tests pass:

 Test Files  26 passed (26)
      Tests  258 passed | 3 skipped (261)
   Start at  12:25:22
   Duration  102.88s (transform 471ms, setup 8.79s, collect 334ms, tests 92.94s, environment 0ms, prepare 73ms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions