setData(data)

Sets Vue instance data and forces update. Can only be called on a Vue component wrapper

Arguments

data (Object): Data properties and corresponding value to set

Example

import { mount } from 'avoriaz';
import Foo from './Foo.vue';

const wrapper = mount(Foo);
wrapper.setData({foo: 'bar'});
expect(wrapper.data().foo).to.equal('bar');

results matching ""

    No results matching ""