Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial
Learn Vue.js with Vue School #1 SOURCE OF VUE.JS KNOWLEDGE

Test with Jest

Get access to this course, 10 others, and future Vue.js courses!

Start Learning

Already got an account? Log in

Execute Code Before and After Tests

Short tests are often good tests. In order to prevent unnecessarily repetitions, we can use Jest's hooks to run code before or after every test.

In this lesson, you'll learn how to execute code before every test and also see a practical example of why it's beneficial.