bwrigley's avatar

Vue3 and Laravel testing

Hi Everyone,

I'm looking at how to best test my Vue components in my Laravel project. Still very new to Vue here so please forgive the vague questions!

I've seen that Jeffrey has done a series on this, but I'm not sure how up-to-date it is and whether Vue test utils and Mocha are still the best combination to use? I appreciate that Dusk will only offer end-to-end testing rather than unit testing my components, but have people found that adequate?

Appreciate your words of wisdom.

0 likes
2 replies
MohamedTammam's avatar

You answered you question. When it comes to single page app with Vue, then it isn't related to Laravel anymore. However, dusk is a good to use it but it isn't limited. You can use vitest, jest, cypress, etc. And it depends whether you want end-to-end testing or unite test.

However, if you're using Inertia, then it comes with it's own testing support. It isn't end-to-end but does the job for me.

1 like
bwrigley's avatar

Thanks @mohamedtammam, I'll give Dusk a go first and see where I get to.

Thanks also for Intertia testing tip, I had missed that!

1 like

Please or to participate in this conversation.