-
Notifications
You must be signed in to change notification settings - Fork 668
Mount method is impacted from previous test function #1050
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. Can you please post a full code reproduction (that I can run) in a GitHub repository. |
Good day, I think I have this problem too, since yesterday, after upgrade. @vue/test-utils version 1.0.0-beta.26 I have a component with child component. Top level component, "Buddies", has nested component "BuddyCard". When top level component "Buddies" is mounted it looks more like shallowMount result. Here is how I mount: const cmp = mount(Buddies, {store, localVue, stubs: ['v-tooltip', 'v-menu']}) The result html (from cmp.html()) has component tag "<buddycard>": <div class="layout row wrap">
<div class="flex d-flex xs3">
<buddycard buddy="[object Object]"></buddycard>
</div>
</div> While I expect to have html code of "buddycard" component. Thanks! |
We have the same issue since @vue/test-utils version 1.0.0-beta.26 |
Can somebody with this issue post a full reproduction that I can run, ideally in a GitHub repo. |
Hey @eddyerburgh, I seem to be having the same issue after updating to 1.0.0-beta.26. It seems that the issue only happens when using vue-test-utils with vuex. https://github.com/ashleysimpson/vue-test-utils-jest-example You can clone this repo and just run the tests and see that the mount is not doing what is expected. Let me know if you have any issues. |
Same here in combination with Vuex. Tests that have nothing to do with Vuex now start failing. On inspection I find that in a test where I use vue router with localvue the router-link now automatically gets stubbed. When I disable Vuex it passes. This is on beta 25 even. |
Version
1.0.0-beta.26
Steps to reproduce
I write some test for my child component. But below mount function can not render child component, if above function use shallowMount. But when I change first test function to mount, below function work properly.
What is expected?
Function mount work properly
What is actually happening?
Function mount doesn't work properly
Here is my code:
The text was updated successfully, but these errors were encountered: