blob: 455504505174ac01879df5118e4f9f545b3f216d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
export function stubComponent(Component, options = {}) {
return {
props: Component.props,
model: Component.model,
// Do not render any slots/scoped slots except default
// This differs from VTU behavior which renders all slots
template: '<div><slot></slot></div>',
// allows wrapper.find(Component) to work for stub
$_vueTestUtils_original: Component,
...options,
};
}
|