In this video we are going to test one of the components (Task) of the VueJS application that we've been working on for the past two weeks using Vue Test Utils and JEST.
We are going to review what are the benefits of unit testing in general, what is the contract of our components that we have to validate and then we are going to see what are the specific things we are going to test from our Task component.
Vue Test Utils is a wrapper based API: A Wrapper is an object that contains a mounted component and methods to test the component. Some of the methods that we are going to use in our tests are:
➥ mount()
➥ setMethods()
➥ html()
➥ find()
We are going to use jest.fn() to mock some functions.
Stay tuned for more!
➥ If I have helped you in any way please consider becoming a patron for just $1/month: / pragmatic
➥➥ Learn even more! ➥➥
NestJS Crash Course ➥ http://bit.ly/2QevL9X
TypeScript Crash Course ➥ http://bit.ly/37lJEsH
Nuxt.js Crash Course ➥ http://bit.ly/37kQiPG
Vuetify.js Crash Course ➥ http://bit.ly/2sArggU
Vue.js Crash Course ➥ http://bit.ly/37mCaFM
Automate.io Crash Course ➥ http://bit.ly/2SRGlph
Zapier Crash Course ➥ http://bit.ly/37q1BGt
SEO Crash Course ➥ http://bit.ly/2QbIhqy
Wordpress Crash Course ➥ http://bit.ly/2ZBZRr5
#Vuejs #Jest #PragmaticReviews