@callumacrae FYI, I'm working on an enhancement to allow a unit test to specify event handlers for a component under test so that you can test that a component correctly emits events.
I'm basically trying to get something like this working:
it('should emit an event', () => {
var spy = sinon.spy();
// eslint-disable-next-line no-unused-vars
const HelloComponent = mount(Hello, {}, '', { someEvent: spy });
// Do something that should make HelloComponent emit 'someEvent'
spy.should.have.been.calledOnce;
});
I hope to have a PR today, but if you have any feedback, I'm happy to hear it.
@callumacrae FYI, I'm working on an enhancement to allow a unit test to specify event handlers for a component under test so that you can test that a component correctly emits events.
I'm basically trying to get something like this working:
I hope to have a PR today, but if you have any feedback, I'm happy to hear it.