Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is due to ESM. You aren't testing the same thing in your jest and vitest test. Enable experimental support for esm in jest, change your test suite template, and run it.

I'm sure that causes the bottleneck for vitest but it's a necessary evil as ecosystem moves toward ES module and no global context across tests.

You can also speed up vitest by changing config to make it behave similar to jest, I think.



I tried using the globals, but it does not have much affect, so I don't think ESM has that much to do with it, see results here: https://github.com/grissius/jest-is-a-rude-needy-clown-and-e...

The benchmark covers several different scenarios, and memory and time efficiency leans more towards Jest (which is already pretty bad as it is), so I don't think it is fair to declare "A blazing fast". The project looks promising (appreciate ESM and TS support), don't get me wrong, but speed is not its strength.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: