Skip to content

docs: update vue-router documentation #1701

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

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

blake-newman
Copy link
Member

Update documentation to explain differences between using localVue and mocks and provide examples of the use case for each.

A common gotcha with integration testing (which don't stub children) is when using the mocks approach the router instance is not available on child components

Copy link

@jamiejones93 jamiejones93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@afontcu
Copy link
Member

afontcu commented Sep 29, 2020

Neat!

Looks like some formatting is a bit off:

Checking formatting...
docs/guides/using-with-vue-router.md
Code style issues found in the above file(s). Forgot to run Prettier?

Would you mind running Prettier and push again? (We should def ease this process with a precommit hook or similar…)

@blake-newman
Copy link
Member Author

@afontcu or i was lazy and committed via github 😆

@lmiller1990
Copy link
Member

I never realized mocks was only for the component in question - I thought it would be available to all the children, too 🤔

It sounds like this should be the default behavior.

Update documentation to explain differences between using `localVue` and `mocks` and provide examples of the use case for each.

A common gotcha with integration testing (which don't stub children) is when using the `mocks` approach the router instance is not available on child components.
@blake-newman blake-newman force-pushed the blake-newman/improve-documentation branch from e2040c3 to f1b6cda Compare October 1, 2020 13:56
@blake-newman
Copy link
Member Author

@lmiller1990 I have created a new issue. Still believe best to document the current behaviour.

@lmiller1990 lmiller1990 merged commit 002eb3e into dev Oct 5, 2020
@lmiller1990 lmiller1990 deleted the blake-newman/improve-documentation branch October 5, 2020 12:47
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.

4 participants