VueWrapper(vm, asChild = false)

Creates a VueWrapper object with helper methods to test the component. It extends the Wrapper with all methods which provided by the class.

Arguments

vm (Vue): The mounted Vue component

asChild (Boolean) [optional]: Whether the Vue Component to be tested is binded as a child of a new Vue Instance or not.

Methods

Example

import Vue from 'vue';
import VueWrapper from '@jasoeight/vue-testing/lib/VueWrapper';
import Example from './path/to/Example.vue';
const Ctor = Vue.extend(Example);
const vm = new Ctor();
vm.$mount();
return new VueWrapper(vm);

results matching ""

    No results matching ""