From 3969c9902d08804e821d714198cf9d3dcb60beff Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 24 Apr 2020 14:45:51 -0700 Subject: [PATCH] add test case for #4251 Signed-off-by: Christopher Hiller --- test/unit/runner.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) 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() {