DEV Community

Nic
Nic

Posted on • Originally published at blog.nicm42.co.uk on

1

Vitest

I started using Vite because it's so fast and does everything I need it to. So it seemed logical to give Vitest a go.

I tried using it with React, and React Testing Library. Although the set up was a little different, everything else was the same. Even the way you write tests is the same as using Jest and React Testing Library.

And on top of that, it's fast. Jest would count up the number of seconds you were waiting. If the test failed it would be a longer wait. And it would always be at least 100 seconds, which is a long time to sit around and learn that you'd made a typo.

Vitest, on the other hand, takes about 2 seconds at most. It's not instant, but in comparison to Jest, it feels like it is. Much as I was a convert to Vite, because it's fast, I'm not a convert to Vitest, because it's fast.

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay