Skip to main content

Mocha driver

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


  • Mocha ^8.0.0 || ^9.0.0


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.

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


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

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