#35 - Unit Testing Vuex 4 - Vue 3 (Options API) Tutorial

Опубликовано: 18 Октябрь 2024
на канале: KoderHQ
1,820
26

In this Vue 3 tutorial, we learn how to test Vuex 4 state management. We cover testing a local store, mutations, data persistence and getters.

Note that this lesson is included in the course for completeness, and because many codebases haven't upgraded to Pinia (Vuex 5) yet. We cover Pinia later on in the series.

We cover the following topics:
1. Lesson Project
2. How to test Vuex Mutations
3. Data persistence between tests
4. Testing with a local store
5. How to test Vuex Getters

Note that this tutorial is for the Vue 3 Options API (which is similar to Vue 2). We later move on to the Composition API and then the Script Setup (3.2 update)

Jest Test Runner
https://jestjs.io/

Vue CLI Unit Jest Plugin
https://cli.vuejs.org/core-plugins/un...

Vue Jest
https://github.com/vuejs/vue-jest

Vue Testing Utilities
https://next.vue-test-utils.vuejs.org/

This lesson is also available in written format
https://www.koderhq.com/tutorial/vue/...

Check out the Vue 3 for Beginners playlist for more Vue tutorial videos
   • Vue 3 for Beginners  

Subscribe to the channel and never miss a lesson
   / @koderhq  

Visit the website for a wide range of programming tutorials
https://www.koderhq.com