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

Support store.watch #86

Open
tokidoki11 opened this issue May 22, 2020 · 2 comments
Open

Support store.watch #86

tokidoki11 opened this issue May 22, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@tokidoki11
Copy link

tokidoki11 commented May 22, 2020

I'm currently using nuxt with vue-composition-api

on my onMount hook, I have store watch.

$store provided by Vuex.Store and Store(this mock) is not having the same implementation?

Vuex watch API: https://vuex.vuejs.org/api/#watch

@posva posva assigned posva and unassigned posva May 22, 2020
@posva posva added the need reproduction Needs a boiled down reproduction label May 22, 2020
@posva
Copy link
Owner

posva commented May 22, 2020

Can you provide a boiled down reproduction without Nuxt? Using the CLI should be fine. As long as you provide the $store to mocks when testing, it should work

@tokidoki11
Copy link
Author

Hi Sorry for the lateness
please find my repo https://github.com/tokidoki11/vue-mock-store-repro
if you run yarn run test:unit you will see the error message regarding the watch

basically in my component folder
i have TestComponent.vue which has watcher for vuex getter

the store is in main.js

@posva posva changed the title context.root.$store.watch is not a function Support store.watch May 27, 2020
@posva posva added enhancement New feature or request good first issue Good for newcomers and removed need reproduction Needs a boiled down reproduction good first issue Good for newcomers labels May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants