Closed
Description
Hi there,
I found that find
can't get functional component.
For instance:
import { mount } from 'vue-test-utils'
import functionalComponent from './functionalComponent'
import ParentComponent from './ParentComponent'
const wrapper = mount(ParentComponent);
wrapper.find(functionalComponent); // Can't find it
I know that functional component is instanceless, so it's understandable that wrapper
can't find it directly. However, that is really hard to test. One way is use ref
to mark component but that is not ease-to-use when using multiple functional components in the same time.
Any suggestions to test functional component? Otherwise, how do you think about supporting finding functional component?