Skip to content

Add documentation on how to mock global components #894

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
ffxsam opened this issue Aug 3, 2018 · 3 comments
Closed

Add documentation on how to mock global components #894

ffxsam opened this issue Aug 3, 2018 · 3 comments

Comments

@ffxsam
Copy link

ffxsam commented Aug 3, 2018

What problem does this feature solve?

When testing components that include globally registered components, the test runner (in this case, Jest) throws warnings asking if the component was registered properly. As far as I can tell, the documentation doesn't explain how to mock global components.

What does the proposed API look like?

N/A

@eddyerburgh
Copy link
Member

The option you're looking for is stubs.

Do you have any suggestions for how we can make this clear? Maybe I guide on mocking components and properties?

@ffxsam
Copy link
Author

ffxsam commented Aug 4, 2018

Yes, 100%! I was surprised to not see a guide about stubbing components.

Thanks!

@eddyerburgh
Copy link
Member

I'm removing comments from this issue since they devolved into an argument. The plan is to add a guide to the documentation on stubbing components and mocking properties.

@vuejs vuejs deleted a comment from willvincent Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from ffxsam Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from ffxsam Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from ffxsam Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from ffxsam Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from ffxsam Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 6, 2018
@vuejs vuejs deleted a comment from 38elements Aug 7, 2018
@vuejs vuejs deleted a comment from 38elements Aug 14, 2018
@vuejs vuejs deleted a comment from willvincent Aug 14, 2018
@vuejs vuejs locked as too heated and limited conversation to collaborators Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants