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
How to unit test component that uses <portal /> #260
Comments
That probably depends on what you want to test.
|
Thank you for the prompt response Linus :). I've changed over our Modal component to implement portal-vue and the test I'm updating is testing that the content rendered in the modal is as expected (ie: I passed in a It sounds like the second bullet, ignoring the element, will accomplish what I'm trying to do. Thank you for the thorough explanation and good advice! I'll give it a try. |
I'll close this as resolved. |
I've taken a look at your integration tests under
tests/unit
but each component being tested implements<portal />
and<portal-target />
.In my situation, I'm just testing a component (a modal) that only implements
<portal />
. The<portal-target />
is implemented in the main app component.How do I go about testing a component created in this fashion?
The text was updated successfully, but these errors were encountered: