From 4c0231c7929b70722a143359e3e5f6eb37f1f490 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Sat, 25 Apr 2020 09:18:25 -0700 Subject: [PATCH] add test case: type check before calling retriedTest() --- 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() {