-
Notifications
You must be signed in to change notification settings - Fork 662
Closed
Labels
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 itI 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?
38elements, freearhey and LordZombi