I am investigating what is the faster and has a smaller memory footprint compare to Vitest, any recommendation? #11368
Unanswered
kasir-barati
asked this question in
Q&A
Replies: 2 comments
|
BTW I have asked same question in Jest since there was not really a clear answer to my question:
My Goal
In a large project with many test suites |
0 replies
|
Before switching test runners, it's usually worth checking if the bottleneck is Vitest's default per-file isolation. In larger projects, recreating the test environment for every single file is what eats up most of the execution time and memory. Here's a straightforward approach to look into:
If it's a frontend project, tweaking Vitest's isolation and worker settings usually gives you the speed boost without breaking your setup. If it's pure Node backend or utility code, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi guys,
I know this might not be the best way to approach this but I was wondering if we have a faster test runner I can use in My NodeJS and Frontend projects written in TS/JS. Right now the bigger the project the longer it takes to finish all the unit tests. I know I can use and probably must use something like Nx to just run those tests which hae been affected. But I would still like to know if there is a faster test runner in NPM echo system (or if possible outside of it) to run my tests faster with smaller memory footprint.
In Vitest we can use
--smol, but there's an important catch:--smolis a memory optimization, not a performance optimization. AKA I am afraid of making the execution even slower because garbage collection happens more aggressively.I have looked at
rjest, but I am unsure still about it. Any comment?I also am considering if I should use Bun, but then we really do not have the Vitest/Jest echo system: https://www.misar.blog/compare/vitest-vs-bun-test
So what are your take on this?
All reactions