Open alecgibson opened 1 year ago
NB: I've raised this against the vue2-vuex3
branch because that's the setup we're currently using. I think in theory this should work fine for v2. If this is a feature that will get merged, I'll also open a PR against master
.
Fixes https://github.com/championswimmer/vuex-module-decorators/issues/207
At the moment, getters cannot be stubbed in tests, because they're defined as unconfigurable.
This change adds a
configurableGetters
option to theModule
options, which isfalse
by default (keeps existing behaviour).If this flag is set to
true
, we allow getters to be reconfigured, which lets us stub them.