Skip to content

feat: add Vuex section #8

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

Closed
afontcu opened this issue Apr 8, 2020 · 2 comments · Fixed by #41
Closed

feat: add Vuex section #8

afontcu opened this issue Apr 8, 2020 · 2 comments · Fixed by #41
Assignees

Comments

@afontcu
Copy link
Member

afontcu commented Apr 8, 2020

  • 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.

@lmiller1990
Copy link
Member

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.

@lmiller1990
Copy link
Member

I will work on this one now

Writing docs is harder than writing code

@lmiller1990 lmiller1990 self-assigned this Jul 21, 2020
@lmiller1990 lmiller1990 mentioned this issue Jul 21, 2020
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 a pull request may close this issue.

2 participants