diff --git a/test/unit/runner.spec.js b/test/unit/runner.spec.js index 9da05b2c98..748ace4cd6 100644 --- a/test/unit/runner.spec.js +++ b/test/unit/runner.spec.js @@ -472,6 +472,13 @@ describe('Runner', function() { runner.emit(EVENT_SUITE_END, suite); expect(cleanReferencesStub, 'was not called'); }); + + // 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('.dispose', function() {