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

fix: allow global components to be stubbed #504

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

posva
Copy link
Member

@posva posva commented Mar 30, 2021

Coming from posva/vue-router-mock#96

The warning happens because I do this: https://github.com/posva/vue-router-mock/blob/v2/src/injections.ts#L37-L41

I think this change is useful to toggle stubs with stubs: {RouterLink: false}

@posva
Copy link
Member Author

posva commented Mar 30, 2021

I'm realizing @cexbrayat already submitted a different fix at https://github.com/vuejs/vue-test-utils-next/pull/483/files. I think it's more reliable to not use the internal API of Vue if possible and avoid registering the global component when possible like in this PR

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

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

I indeed prefer your fix 👍

@cexbrayat cexbrayat merged commit 6766b04 into master Mar 30, 2021
@cexbrayat cexbrayat deleted the fix/warn-stubs-components branch March 30, 2021 08:32
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.

2 participants