Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Jan 8, 2019
1 parent d9cf38a commit df86333
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/unit/mocha.spec.js
Expand Up @@ -78,6 +78,19 @@ describe('Mocha', function() {
});
});

describe('.runnerOn()', function() {
it('should add the given event to the runnerEvents array', function() {
var mocha = new Mocha(opts);
var fn = function() {};
mocha.runnerOn('fake', fn);
expect(mocha.runnerEvents, 'to have length', 1);
expect(mocha.runnerEvents[0][0], 'to be', 'fake');
expect(mocha.runnerEvents[0][1], 'to be', fn);
var runner = mocha.run();
expect(runner.listenerCount('fake'), 'to be', 1);
});
});

describe('.invert()', function() {
it('should set the invert option to true', function() {
var mocha = new Mocha(opts);
Expand Down

0 comments on commit df86333

Please sign in to comment.