question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tests run 3x slower than Jest

See original GitHub issue

Describe the bug

Tests run 3x slower than Jest for me.

Reproduction

vitest: https://github.com/sachinraja/zod-to-ts/tree/vitest jest: https://github.com/sachinraja/zod-to-ts/tree/main

System Info

System:
    OS: Linux 5.15 Pop!_OS 21.10
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 5.03 GB / 15.44 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.11.1 - ~/.asdf/installs/nodejs/16.11.1/bin/node
    Yarn: 1.22.15 - ~/.asdf/installs/nodejs/16.11.1/.npm/bin/yarn
    npm: 8.0.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Brave Browser: 96.1.33.106
    Firefox: 95.0
  npmPackages:
    vite: 2.7.4 => 2.7.4 
    vitest: 0.0.100 => 0.0.100

Used Package Manager

pnpm

Validations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
Demivancommented, Dec 30, 2021

@sachinraja Tests are taking ~800ms now. And with threads disabled ~650ms.

1reaction
Demivancommented, Dec 31, 2021

I saw that threads are slower too. Alter checking it with nodejs profiler I can see that workers are idling a lot. Will investigate where bottleneck is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vitest runs tests 3x slower than Jest with threads: true (default ...
With Jest, it takes 30 to 40 seconds. With Vitest, it takes 130 to 150 seconds. Roughly 3 to 4 times slower, which...
Read more >
Vitest is fast, jest is faster * - DEV Community ‍ ‍
Vitest runs tests 3x slower than Jest with threads: true · Coverage is very slow on large projects.
Read more >
With CRA upgrade from 3.4.1 to 4.0.3 tests are running much ...
the tests are 3x slower when run with runInBand , they take approx. 1700 seconds compared to approx. 600 seconds before the update;;...
Read more >
Troubleshooting - Jest
Normally Jest parallelizes test runs across processes but it is hard to debug many processes at the same time. Debugging in VS Code​....
Read more >
Node Testing Frameworks: The Good, the Bad, the Slow and ...
Jest requires more than 3x more memory than average · AVA has the worst memory performance, but adequate to unmatched speed (individual tests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found