Skip to main content

Mocha driver

Provides Mocha support by dynamically generating a .mocharc.js config file.

Requirements#

  • Mocha ^8.0.0

Installation#

In your configuration module, install the driver and Mocha.

yarn add @beemo/driver-mocha mocha

Create a file at configs/mocha.ts (or js) in which to house your Mocha configuration.

configs/mocha.ts
import { MochaConfig } from '@beemo/driver-mocha';
const config: MochaConfig = {
asyncOnly: true,
checkLeaks: true,
// ...
};
export default config;

Integration#

In your consuming project, enable the driver by adding mocha to your drivers config.

.config/beemo.ts
import { BeemoConfig } from '@beemo/core';
const config: BeemoConfig = {
module: '<config-module>',
drivers: ['mocha'],
};
export default config;