@gavajs/vue
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

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

Package Sidebar

Install

npm i @gavajs/vue

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

4.27 kB

Total Files

7

Last publish

Collaborators

  • symonenko