-
Notifications
You must be signed in to change notification settings - Fork 668
Mounting Option stubs
not working.
#713
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
Comments
Thanks for the bug report. A temporary fix is to add it to the ignored elements: import Vue from 'vue'
Vue.config.ignoredElements.push('router-link-stub') |
Could the |
That's a seperate issue that's been fixed in #709. I'll release this evening 👍 |
I still experience the same behaviour in beta.19. |
Can you create an issue with a reproduction? |
The following codes BEFORE tests fixed the behavior in my environment with beta.20. import Vue from 'vue';
Vue.config.ignoreElements = []; It seems |
Can you check if setting it in mount.js fixes the issue? |
Version
1.0.0-beta.18
Reproduction link
https://jsfiddle.net/cpxPratik/sa3yqznw/3/
Steps to reproduce
When shallowmounting or mounting, giving
stubs
mounting option such asstubs: ['router-link']
.What is expected?
Should not have any warning.
What is actually happening?
Warning on console:
[Vue warn]: Unknown custom element: <router-link-stub> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Doing
VueTestUtils.config.stubs['router-link'] = '<div />'
solves it, but mounting option should have worked too unless i am misunderstanding sth. Warning was produced after updating from 1.0.0-beta.14 to 1.0.0-beta.16, there was not warning beforehand.The text was updated successfully, but these errors were encountered: