In my recent experience, I faced the challenge of integrating the Jest testing framework into an existing Vue3 js project that was built with Vite....
For further actions, you may consider blocking this person and/or reporting abuse
Although the guide in itself is pretty well written, I don't really see why would one want to use jest in a vite app, in a world where vitest exists.
Vitest gives you :
There might be exceptions, but overall I recommend anyone working on a vite app to use vitest over jest
I was wondering about Vitest actually...
But to be fair, it took a while for me to realize that Vitest actually exist, haha.
I just moved a Sveltekit project from Jest to Vitest and it was fairly straightforward. It's possible to retain the Jest test helpers so I only had a few trivial changes in the tests themselves and otherwise just some config changes.
Try it! Then you'll have some material for a follow up article ;)
Thanks for replying. I truly understand that but the requirement here is to integrate JEST so and it is stable and widely used so. But in future definitely I will research Vitest and will write a blog about it. :)
I have a Vite repository with only version 3, but the latest Vitest requires version 5 or above. Instead, I might choose Jest, which is not coupled with the framework.
Overall, this blog post has given me the confidence and knowledge to integrate Jest testing seamlessly into my Vue 3 project with ViteJs. It's a fantastic resource for any Vue developer looking to level up their testing game. Thank you for sharing this informative guide!
Thankyou :)
It works! Thank you.
Ur welcome :)
Awesome article, help me a lot
Thanks
Thankyou :)
Great article with step by step guide to integrate in my Vue 3 project
This is exactly what I was looking for...
Hope to see more of such posts.
Thankyou :)
Curious, i'm getting this using your npm script (kubuntu / node 19) on fresh project
assuming i'm not just being silly