Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I am testing a class consists of several methods. I have describe blocks for each methods, each contains several tests. When running test with coverage for each describe blocks individually, there is no issue. When I run all of them, it throws

INFO 13:14:12] [Worker] node:buffer:1146
      data[i] = this[i];
              ^

RangeError: Invalid array length
    at Uint8Array.toJSON (node:buffer:1146:15)
    at stringify (<anonymous>)
    at writeChannelMessage (node:internal/child_process/serialization:159:20)
    at target._send (node:internal/child_process:851:17)
    at target.send (node:internal/child_process:751:19)
    at Pr.send (/Users/username/.vscode/extensions/vitest.explorer-1.6.9/dist/worker.js:21:8742)
    at post (/Users/username/.vscode/extensions/vitest.explorer-1.6.9/dist/worker.js:21:9265)
    at Proxy.P (/Users/username/.vscode/extensions/vitest.explorer-1.6.9/dist/worker.js:8:27974)
    at /Users/username/.vscode/extensions/vitest.explorer-1.6.9/dist/worker.js:21:7079
    at process.processTicksAndRejections (node:internal/process/task_queues:85:11)

If I reduce the number of tests on a specific method, the error goes away. But there is no error when I run all tests on only that method. How do I narrow down the problem?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.