mocha#Runner TypeScript Examples

The following examples show how to use mocha#Runner. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: mocha.ts    From earl with MIT License 6 votes vote down vote up
/**
 * In mocha run mode, we use the suite with hooks already assigned to Mocha's exports.
 */
exports.mochaGlobalSetup = function (this: Runner) {
  d('Integrating earl with mocha...')

  if ((mocha as Partial<MochaHooks>).beforeEach) {
    setTestRunnerIntegration(new MochaCtx(mocha))
  }
}