feat: add Vuex section
afontcu opened this issue · comments
- showcase how to test a component that interacts with a store.
- showcase how to mock/stub some potentially expensive Vuex actions (through
jest.mock
). - explain how, if needed, testing a Vuex store in isolation is no different from testing any other JS function/object.
I'm assuming Vuex 4, by the way.
You can use this for some inspiration: https://github.com/vuejs/vue-test-utils-next/blob/master/tests/features/vuex.spec.ts
I think it would be good to include both mocking the store, and using a real store, and the pros/cons.
I will work on this one now
Writing docs is harder than writing code