Component
vuenit.component(componentDefinition, options)
The component function creates an instance of a specified component. Plugin values such as $router can be injected in before the component is initialised, and props can also be passed in as if they were real values.
vuenit will also handle converting template
s into render
functions if the component hasn't already been compiled at some point.
The component method can also be aliased as mockComponent or mount:
import {component, mockComponent, mount} from 'vuenit';
component(c);
mockComponent(c);
mount(c);
The function takes two parameters: Component
and Options
.