We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9cf38a commit df86333Copy full SHA for df86333
test/unit/mocha.spec.js
@@ -78,6 +78,19 @@ describe('Mocha', function() {
78
});
79
80
81
+ describe('.runnerOn()', function() {
82
+ it('should add the given event to the runnerEvents array', function() {
83
+ var mocha = new Mocha(opts);
84
+ var fn = function() {};
85
+ mocha.runnerOn('fake', fn);
86
+ expect(mocha.runnerEvents, 'to have length', 1);
87
+ expect(mocha.runnerEvents[0][0], 'to be', 'fake');
88
+ expect(mocha.runnerEvents[0][1], 'to be', fn);
89
+ var runner = mocha.run();
90
+ expect(runner.listenerCount('fake'), 'to be', 1);
91
+ });
92
93
+
94
describe('.invert()', function() {
95
it('should set the invert option to true', function() {
96
var mocha = new Mocha(opts);
0 commit comments