Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

add test case: type check before calling retriedTest()

Christopher Hiller4c0231c7929b
diff --git a/test/unit/runner.spec.js b/test/unit/runner.spec.js
index 79edfc47..692559f1 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() {