Skip to content

wrapper.findComponent(VueComponentInstance).exists() always returns true #1884

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
zkd8907 opened this issue Jul 21, 2021 · 2 comments
Closed

Comments

@zkd8907
Copy link
Contributor

zkd8907 commented Jul 21, 2021

I upgraded @vue/test-utils to 1.2.1 and found my tests failed. I found the similar issue at #810. Vue Component doesn't be rendered because v-if="false", however wrapper.findComponent(VueComponentInstance).exists() always returns true.
I located commits at https://github.com/vuejs/vue-test-utils/pull/768/files. I found find-vue-components.js listed in the PR was removed at dev branch. Is this file deprecated? Does findComponent implement as another way with the same mistake?

@zkd8907 zkd8907 changed the title find(Component).exists() always returns true wrapper.findComponent(VueComponentInstance).exists() always returns true Jul 21, 2021
@standbyoneself
Copy link
Contributor

Create a repository that reproduces your problem

findComponent() implementation is located in packages/test-utils/src/wrapper.js

@zkd8907
Copy link
Contributor Author

zkd8907 commented Jul 29, 2021

After I tested, I found that this problem does not exist, sorry for the issue.

@zkd8907 zkd8907 closed this as completed Jul 29, 2021
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

No branches or pull requests

2 participants