1 | module.exports = {
|
2 | cwd: {
|
3 | type: 'string',
|
4 |
|
5 | description: 'Current dir'
|
6 | },
|
7 | testFiles: {
|
8 | alias: ['t'],
|
9 | type: 'array',
|
10 | default: [
|
11 | '*test*/**',
|
12 | '**/*.test.*',
|
13 | '**/test.*',
|
14 | ],
|
15 | description: 'Files to test (anymatch)',
|
16 | },
|
17 | sourceFiles: {
|
18 | alias: ['s'],
|
19 | type: 'array',
|
20 | default: ['.'],
|
21 | description: 'Source files (for coverage) (anymatch)',
|
22 | },
|
23 | exclude: {
|
24 | type: 'array',
|
25 | default: ['.*', 'node_modules', 'coverage'],
|
26 | description: 'Files to exclude (anymatch)',
|
27 | },
|
28 | gitignore: {
|
29 | type: 'string',
|
30 | default: ['.gitignore', '~/.gitignore'],
|
31 | description: 'Files to exclude based on .gitignore',
|
32 | },
|
33 | extensions: {
|
34 | type: 'array',
|
35 | default: ['.js'],
|
36 | description: 'Extensions to monitor (all other files ignored)',
|
37 | },
|
38 | watch: {
|
39 | alias: ['w'],
|
40 |
|
41 | description: 'Watch for file changes and re-run. `--watch=i` to only re-run on pressing Enter',
|
42 | },
|
43 | coverage: {
|
44 | type: 'boolean',
|
45 | default: true,
|
46 | description: 'Collect coverage (use --no-coverage to disable)',
|
47 | },
|
48 | coverageDir: {
|
49 | type: 'string',
|
50 | default: './coverage',
|
51 | description: 'Directory to output coverage and reports',
|
52 | },
|
53 | coverageFirst: {
|
54 | type: 'boolean',
|
55 | description: 'Show coverage before test results (patches console)',
|
56 | },
|
57 | reporter: {
|
58 | type: 'string',
|
59 | default: 'spec',
|
60 | description: 'Mocha reporter',
|
61 | },
|
62 | report: {
|
63 | type: 'array',
|
64 | default: ['text', 'lcov', 'html'],
|
65 | description: 'Istanbul reporters',
|
66 | },
|
67 | require: {
|
68 | alias: ['r'],
|
69 | type: 'array',
|
70 | default: [],
|
71 | description: 'Require the given module',
|
72 | },
|
73 | all: {
|
74 | alias: ['a'],
|
75 | type: 'boolean',
|
76 | description: 'Instrument all files',
|
77 | },
|
78 | 'mocha-xxx': {
|
79 | description: 'All mocha-related options, like --mocha-fgrep etc',
|
80 | },
|
81 | 'opts': {
|
82 | description: 'Opts file path',
|
83 | default: 'tests/mochista.opts',
|
84 | },
|
85 | };
|