vue-test
vue-test copied to clipboard
Add ability to test emitted events
Before merging, we should probably have a discussion on whether adding another parameter to mount is a good idea...
An alternative could be to turn the returned object into an event emitter instead of adding another argument:
const mounted = mount(Events);
mounted.on('anEvent', spy);
mounted.find('a:first-child').trigger('click');
Wonder if that would be a better idea anyway.
Also, could you test that the event is being passed in as an argument?