-
Robert Knight authored
In mocha >= 7.1.0, exceptions thrown in test hooks (eg. a `beforeEach` hook) cause the tests to hang without printing any useful exception details. From my notes in a Slack investion: > The karma-mocha package is responsible for running mocha by calling > mocha.setup() before the test modules are evaluated and then mocha.run() > after they are evaluated to actually run the tests, as well as listening > for test events from Mocha’s “runner” and reporting them back to Karma. > When the beforeEach hook fails, the runner emits a “fail” event which > karma-mocha receives. karma-mocha then attempts to emit a “test end” > event and that ends up triggering an exception in a call to > test.retriedTest() in code which was added in > https://github.com/mochajs/mocha/pull/4181/files. Until this issue is resolved, pin mocha to a version that doesn't trigger this problem.
a851440a