Skip to content

Vue Component cannot be passed to mount #636

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
No9 opened this issue May 21, 2018 · 2 comments
Closed

Vue Component cannot be passed to mount #636

No9 opened this issue May 21, 2018 · 2 comments
Labels

Comments

@No9
Copy link

No9 commented May 21, 2018

Version

1.0.0-beta.16

Reproduction link

https://github.com/No9/vue-test-utils-issue

Steps to reproduce

See repo

> git clone https://github.com/No9/vue-test-utils-issue.git
> cd vue-test-utils-issue
> npm install
> npm test

What is expected?

Passing a Vue Component to vue-test-utils.mount should work as per
#329 (comment)

What is actually happening?

An error is thrown that wrapper.html() is undefined


I may have misunderstood the use of the wrapper and the library here and unpacking the vue as per the first passing test is expected behavior.

@eddyerburgh
Copy link
Member

Thanks for the detailed bug report. It was easy to find the problem using your minimal reproduction 😀

The issue was that we weren't compiling extended components correctly. I've fixed this and it will be in the next release. Worth noting that this isn't fixed in Vue < 2.3 due to a bug with mergeOptions.

@No9
Copy link
Author

No9 commented May 22, 2018

Thanks @eddyerburgh - I am on vue@latest so that doesn't impact -
Glad it was a useful report and thanks again for turning it around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants