trigger(eventName)
trigger an event on the wrapper
Arguments
event (String
): type of event (e.g. click).
Example
import { mount } from 'avoriaz';
import sinon from 'sinon';
import Foo from './Foo.vue';
const clickHandler = sinon.stub();
const wrapper = mount(Foo, {
propsData: { clickHandler },
});
wrapper.trigger('click');
expect(clickHandler.called).to.equal(true)