Closed
Description
Version
1.0.0-beta.30
Reproduction link
https://gitlab.com/unclejustin/test-utils-but
Steps to reproduce
In a test reference an element by ref. Then try to find anything in that element using anything other than a dom selector:
const button = wrapper.find({ ref: "testButton" });
expect(button.find(Icon).exists()).toBe(true);
This will throw the errror "[vue-test-utils]: cannot find a Vue instance on a DOM node. The node you are calling find on does not exist in the VDom. Are you adding the node as innerHTML?"
What is expected?
That found elements have the same functionality as root wrappers.
What is actually happening?
Throwing an error.
I think this should work as described, but if I am wrong then maybe the docs just need to be updated to reflect the actual functionality?
Metadata
Metadata
Assignees
Labels
No labels