Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Allow getters to be reconfigured #420

Open
wants to merge 1 commit into
base: vue2-vuex3
Choose a base branch
from

Conversation

alecgibson
Copy link

@alecgibson alecgibson commented Jun 8, 2023

Fixes #207

At the moment, getters cannot be stubbed in tests, because they're defined as unconfigurable.

This change adds a configurableGetters option to the Module options, which is false by default (keeps existing behaviour).

If this flag is set to true, we allow getters to be reconfigured, which lets us stub them.

At the moment, getters cannot be stubbed in tests, because they're
defined as unconfigurable.

This change adds a `configurableGetters` option to the `Module` options,
which is `false` by default (keeps existing behaviour).

If this flag is set to `true`, we allow getters to be reconfigured,
which lets us stub them.
@alecgibson
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant