Find the Vue.js 3 version here.
Welcome to the Vue.js testing handbook!
Each section is independent from the others. We start of by setting up an environment with and writing a simple test. Next, two ways to render a component are discussed - and . The differences will be demonstrated and explained.
From then on, we cover how to test various scenarios that arise when testing components, such as testing components that:
- receive props
- use computed properties
- render other components
- best practises for testing Vuex (in components, and independently)
- testing Vue router
- testing involving third party components
We will also explore how to use the Jest API to make our tests more robust, such as:
- mocking API responses
- using snapshots
Further Reading
Other useful resources include:
- I made free series on Vue Test Utils + Vue 3: YouTube playlist
- My . VUEJS_COURSE_10_OFF for a $10 discount!