Skip to content

fix: allow global components to be stubbed - #504

Merged
cexbrayat merged 1 commit into
masterfrom
fix/warn-stubs-components
Mar 30, 2021
Merged

cexbrayat merged 1 commit into
masterfrom
fix/warn-stubs-components

Conversation

@posva

@posva posva commented Mar 30, 2021

Copy link
Copy Markdown
Member

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

posva commented Mar 30, 2021

Copy link
Copy Markdown
Member Author

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

@cexbrayat cexbrayat left a comment

Copy link
Copy Markdown
Member

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 👍

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