diff --git a/test/unit/runner.spec.js b/test/unit/runner.spec.js index 79edfc47a1..692559f1ed 100644 --- a/test/unit/runner.spec.js +++ b/test/unit/runner.spec.js @@ -452,6 +452,13 @@ describe('Runner', function() { done(); }); }); + + // karma-mocha is inexplicably doing this with a Hook + it('should not throw an exception if something emits EVENT_TEST_END with a non-Test object', function() { + expect(function() { + runner.emit(EVENT_TEST_END, {}); + }, 'not to throw'); + }); }); describe('.runTest(fn)', function() {