@stryker-mutator/mocha-runner
Version:
A plugin to use the mocha test runner in Stryker, the JavaScript mutation testing framework
77 lines (75 loc) • 2.98 kB
text/typescript
/**
* This file was automatically generated by generate-json-schema-to-ts.js.
* DO NOT MODIFY IT BY HAND. Instead, modify the source file JSON file: mocha-runner-options.json,
* and run 'npm run generate' from monorepo base directory.
*/
export interface MochaRunnerOptions {
mochaOptions: MochaOptions;
}
/**
* Configuration for @stryker-mutator/mocha-runner
*/
export interface MochaOptions {
/**
* Set mocha's [`require` option](https://mochajs.org/#-r---require-module-name)
*/
require?: string[];
/**
* Set mocha's [`ignore option](https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml#L26)
*/
ignore?: string[];
/**
* Set mocha's [`file options`](https://mochajs.org/#-file-filedirectoryglob)
*/
file?: string[];
/**
* Specify a ['mocha.opts' file](https://mochajs.org/#mochaopts) to be loaded. Options specified directly in your stryker.conf.js file will overrule options from the 'mocha.opts' file. Disable loading of an additional mocha.opts file with `false`. The only supported mocha options are used: `--ui`, `--require`, `--async-only`, `--timeout`, `--grep` (or their short form counterparts). Others are ignored by the @stryker-mutator/mocha-runner.
*/
opts?: string;
/**
* Explicit path to the [mocha config file](https://mochajs.org/#-config-path)
*/
config?: string;
/**
* Specify an explicit path to a package.json file (ostensibly containing configuration in a mocha property). See https://mochajs.org/#-package-path.
*/
package?: string;
/**
* Explicit turn off [mocha package file](https://mochajs.org/#-package-path)
*/
'no-package'?: boolean;
/**
* Explicit turn off [mocha opts file](https://mochajs.org/#-opts-path)
*/
'no-opts'?: boolean;
/**
* Explicit turn off [mocha config file](https://mochajs.org/#-config-path)
*/
'no-config'?: boolean;
/**
* Set mocha's [`async-only` option](https://mochajs.org/#-async-only-a)
*/
'async-only'?: boolean;
/**
* Set the name of your [mocha ui](https://mochajs.org/#-u---ui-name)
*/
ui?: 'bdd' | 'tdd' | 'qunit' | 'exports';
/**
* DEPRECATED, use `spec` instead.
*/
files?: string | string[];
/**
* Choose which files to include. This is comparable to [mocha's test directory](https://mochajs.org/#the-test-directory) although there is no support for `--recursive`.
*
* If you want to load all files recursively: use a globbing expression (`'test/** /*.js'`). If you want to decide on the order of files, use multiple globbing expressions. For example: use `['test/helpers/** /*.js', 'test/unit/** /*.js']` if you want to make sure your helpers are loaded before your unit tests.
*/
spec?: string[];
/**
* Specify a mocha [`grep`](https://mochajs.org/#grep) command, to single out individual tests.
*/
grep?: string;
/**
* Specify mocha [--extension](https://mochajs.org/#-extension-ext) property.
*/
extension?: string[];
}