Testing in Vue 3 provides benefits such as easier refactoring later down the line, quicker debugging, and documentation about your application. Today, we will be creating a Vue 3 app and adding unit tests with jest. We'll do this by using the Vue Test Utils library which is a set of functions to simplify the testing of Vue.js components. It provides methods to mount and interact with Vue components in an isolated manner. We'll also take at a more advanced use case where we will create a mock Vuex store for the component.
#vue #testing
⚡ RESOURCES ⚡
Vue 3 - https://v3.vuejs.org/
Vue 3 Test Utils - https://vue-test-utils.vuejs.org/v2/g...
Jest - https://jestjs.io/
⭐ TIMESTAMPS ⭐
0:00 - Intro
0:50 - Setup
1:07 - Intro to Jest
1:45 - Basic Component Test
4:09 - Vuex Component Test
5:26 - Conclusion