Skip to content

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.

5 participants