@gavajs/vue
v0.2.1
Published
Vue unit test
Downloads
315
Maintainers
Readme
Gava.js Vue
Library for Vue.js 3 projects
Usage
Use for unit testing with any test runner.
Mount component
import { mount } from '@gavajs/vue';
const instance = mount(Component);
The mount function have input interface the same with Vue render function.
And return ComponentPublicInstance
// short signature
// with props
function mount(type: string | Component, props?: object): ComponentPublicInstance;
// or with children
function mount(type: string | Component, children?: Children): ComponentPublicInstance;
type Children = string | number | boolean | VNode | null | Children[];
// or with slot
function mount(type: string | Component, slot?: () => Children): ComponentPublicInstance;
// or with named slots
function mount(type: string | Component, slots: { [name: string]: Slot }): ComponentPublicInstance;
// long signature
function mount(
type: string | Component,
props?: object | null,
children?: Children | Slot | Slots
): ComponentPublicInstance