'VueStore TypeError: Cannot read property 'getters' of undefined, on child component - Jest and Nuxt
When running Jest tests, a child-component of a mounted-component, uses mapGetters to get some values from store, and it throws Error when trying to read the vuex getters on the jest-test.
Even using:
const wrapper = mount(parentComp, { localVue, store });
Child-component throws error. On the paren, the store it's working.
How should i inject the store into the child-components
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
