Saturday 27 January 2018

Tests don't exit after upgrading to mocha 5.0.0

I have the following test (testing an event emitter) that worked fine on version 3.5.0.it.only('should run tasks when an event is emitted', () => { const watcher = gue._watch(__dirname, 'foo'); // don't restart the watch loop watcher.close = () => {}; const startStub = sandbox .stub(gue.gueTasks, 'runTaskParallel') .resolves(); watcher.emit('all'); expect(startStub).to.be.calledWith('foo'); }); Basically making sure that runTaskParallel gets called correctly when the watcher emits. Any idea why the test is no longer exiting?

Submitted January 27, 2018 at 04:54PM by skarfacegc

No comments:

Post a Comment