DEV Community

Valentin Prugnaud 🦊
Valentin Prugnaud 🦊

Posted on

Unit Testing with Nuxt.js

I’m currently working on an app built with Nuxt.js. I have written a couple tests, but they only test component mounting and its template against a snapshot, but it doesn’t test much and it doesn’t seem scalable.

I’m more of a backend dev initially, so I am not familiar with the best practices to write unit tests with Nuxt/Vue.js.

Any tips or best practices to run unit tests with Nuxt/Vue at scale? What is your experience with it?

Top comments (2)

Collapse
 
artilishes profile image
Arthur

Check out Jest. It's pretty straight forward. I used it in my last project and made good experience with it.
Here's a starting point: vue-test-utils.vuejs.org/guides/te...

Collapse
 
valentinprgnd profile image
Valentin Prugnaud 🦊

I am using Jest πŸ‘πŸ»