UNPKG

2.98 kBPlain TextView Raw
1/**
2 * This file was automatically generated by generate-json-schema-to-ts.js.
3 * DO NOT MODIFY IT BY HAND. Instead, modify the source file JSON file: mocha-runner-options.json,
4 * and run 'npm run generate' from monorepo base directory.
5 */
6
7export interface MochaRunnerOptions {
8 mochaOptions: MochaOptions;
9}
10/**
11 * Configuration for @stryker-mutator/mocha-runner
12 */
13export interface MochaOptions {
14 /**
15 * Set mocha's [`require` option](https://mochajs.org/#-r---require-module-name)
16 */
17 require?: string[];
18 /**
19 * Set mocha's [`ignore option](https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml#L26)
20 */
21 ignore?: string[];
22 /**
23 * Set mocha's [`file options`](https://mochajs.org/#-file-filedirectoryglob)
24 */
25 file?: string[];
26 /**
27 * 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.
28 */
29 opts?: string;
30 /**
31 * Explicit path to the [mocha config file](https://mochajs.org/#-config-path)
32 */
33 config?: string;
34 /**
35 * Specify an explicit path to a package.json file (ostensibly containing configuration in a mocha property). See https://mochajs.org/#-package-path.
36 */
37 package?: string;
38 /**
39 * Explicit turn off [mocha package file](https://mochajs.org/#-package-path)
40 */
41 'no-package'?: boolean;
42 /**
43 * Explicit turn off [mocha opts file](https://mochajs.org/#-opts-path)
44 */
45 'no-opts'?: boolean;
46 /**
47 * Explicit turn off [mocha config file](https://mochajs.org/#-config-path)
48 */
49 'no-config'?: boolean;
50 /**
51 * Set mocha's [`async-only` option](https://mochajs.org/#-async-only-a)
52 */
53 'async-only'?: boolean;
54 /**
55 * Set the name of your [mocha ui](https://mochajs.org/#-u---ui-name)
56 */
57 ui?: 'bdd' | 'tdd' | 'qunit' | 'exports';
58 /**
59 * DEPRECATED, use `spec` instead.
60 */
61 files?: string | string[];
62 /**
63 * 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`.
64 *
65 * 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.
66 */
67 spec?: string[];
68 /**
69 * Specify a mocha [`grep`](https://mochajs.org/#grep) command, to single out individual tests.
70 */
71 grep?: string;
72 /**
73 * Specify mocha [--extension](https://mochajs.org/#-extension-ext) property.
74 */
75 extension?: string[];
76}