-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmd-opts.js
executable file
·398 lines (398 loc) · 12.5 KB
/
cmd-opts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
'use strict';
module.exports = [
{
names: ['tsc-multi-watch'],
type: 'bool',
help: 'Suman will transpile any changes to .ts files in the project.'
},
{
names: ['no-color', 'no-colors'],
type: 'bool',
help: 'Tells the NPM colors module to not use any control chars for color.'
},
{
names: ['version', 'vn'],
type: 'bool',
help: 'Print tool version and exit.'
},
{
names: ['force-match'],
type: 'bool',
help: 'Any files passed at the command line will be run, even if they do not match any regex mentioned in config or command line.'
},
{
names: ['verbosity', 'v'],
type: 'integer',
default: 5,
help: 'Verbosity is an integer between 1 and 9, inclusive; the bigger the number the more verbose; default is 5.'
},
{
names: ['help', 'h'],
type: 'bool',
help: 'Print this help menu and exit.'
},
{
names: ['inherit-stdio'],
type: 'bool',
help: 'When using the runner, the runner (parent process) will inherit stdout/stderr from test child processes; useful' +
'for simple and quick debugging.'
},
{
names: ['force-inherit-stdio'],
type: 'bool',
help: 'Force inherit stdio, which will use inherit instead of pipe.'
},
{
names: ['match-any'],
type: 'arrayOfString',
help: 'Use this to filter input to match the given JS regex',
},
{
names: ['match-none'],
type: 'arrayOfString',
help: 'Use this to filter input to ignore matches of the given JS regex',
},
{
names: ['match-all'],
type: 'arrayOfString',
help: 'Use this to filter input to ignore matches of the given JS regex',
},
{
names: ['append-match-any'],
type: 'arrayOfString',
help: 'Use this to filter input to match the given JS regex',
},
{
names: ['append-match-none'],
type: 'arrayOfString',
help: 'Use this to filter input to ignore matches of the given JS regex',
},
{
names: ['append-match-all'],
type: 'arrayOfString',
help: 'Use this to filter input to ignore matches of the given JS regex',
},
{
names: ['babel-register', 'use-babel-register'],
type: 'bool',
help: 'Use babel-core register to transpile sources on the fly, even in child processes.'
},
{
names: ['no-babel-register', 'no-use-babel-register'],
type: 'bool',
help: 'Prevent usage of babel-register, even useBabelRegister is set to true in your config.'
},
{
names: ['sort-by-millis'],
type: 'bool',
help: 'Prints a duplicate Runner results table sorted by millis fastest to slowest.'
},
{
names: ['create'],
type: 'arrayOfString',
help: 'Create suman test skeleton at the path(s) you specified.'
},
{
names: ['force-cwd-to-be-project-root', 'cwd-is-root', 'force-cwd-root'],
type: 'bool',
help: 'Run Suman tests and force cwd to be the project root.'
},
{
names: ['force-cwd-to-test-file-dir', 'cwd-is-tfd'],
type: 'bool',
help: 'Will force the cwd for the runner child_processes to be the directory that contains the test file.'
},
{
names: ['use-container'],
type: 'bool',
help: 'Use this option to force-specify to use a container with --groups and suman.groups.js.'
},
{
names: ['no-use-container'],
type: 'bool',
help: 'Use this option to force-specify to not use a container with --groups and suman.groups.js.'
},
{
names: ['allow-duplicate-tests'],
type: 'bool',
help: 'Use this option to allow running a test more than once in the same run (with the runner).'
},
{
names: ['allow-reuse-image'],
type: 'bool',
help: 'Use this option to force-specify to reuse all container images.'
},
{
names: ['no-allow-reuse-image'],
type: 'bool',
help: 'Use this option to force-specify to rebuild all container images.'
},
{
names: ['no-stream-to-file'],
type: 'bool',
help: 'Use this option to force-specify that no child process data be streamed to any files.'
},
{
names: ['no-stream-to-console'],
type: 'bool',
help: 'Use this option to force-specify that no child process data be streamed to console.'
},
{
names: ['suman-helpers-dir', 'shd'],
type: 'string',
internal: true,
help: 'Use this option to force-specify the directory that houses the suman helpers files.'
},
{
names: ['recursive', 'r'],
type: 'bool',
help: 'Use this option to recurse through sub-directories of tests.'
},
{
names: ['safe'],
type: 'bool',
help: 'Reads files in with fs.createReadStream and makes sure it\'s a suman test before running'
},
{
names: ['force', 'f'],
type: 'bool',
help: 'Force the command at hand.'
},
{
names: ['fforce', 'ff'],
type: 'bool',
help: 'Force the command at hand, with super double force.'
},
{
names: ['pipe', 'p'],
type: 'bool',
help: 'Pipe data to Suman using stdout to stdin.'
},
{
names: ['convert', 'cnvt'],
type: 'bool',
help: 'Convert Mocha test file or directory to Suman test(s).'
},
{
names: ['bail', 'b'],
type: 'bool',
help: 'Bail upon the first test error.'
},
{
names: ['use-tap-output', 'use-tap', 'tap'],
type: 'bool',
help: 'Use this option to tell Suman runner to interpret TAP output from child process(es) stdout.'
},
{
names: ['suman-d'],
type: 'bool',
internal: true,
help: 'Run suman-d.'
},
{
names: ['no-tap'],
type: 'bool',
help: 'Use this option to tell Suman runner to *not* interpret TAP output from child process(es) stdout.'
},
{
names: ['inspect-child', 'inspect-children'],
type: 'bool',
help: 'Use this option to aid in the debugging of child_processes.'
},
{
names: ['debug-child', 'debug-children'],
type: 'bool',
help: 'Use this option to aid in the debugging of child_processes.'
},
{
names: ['ignore-break'],
type: 'bool',
help: 'Use this option to aid in the debugging of child_processes.'
},
{
names: ['ignore-uncaught-exceptions', 'iue'],
type: 'bool',
help: 'Use this option to aid in the debugging of child_processes.'
},
{
names: ['ignore-unhandled-rejections', 'iur'],
type: 'bool',
help: 'Use this option to aid in the debugging of child_processes.'
},
{
names: ['runner', 'force-runner'],
type: 'bool',
help: 'Sole purpose of this flag is to force the usage of the runner when executing only one test file.'
},
{
names: ['watch', 'w'],
type: 'bool',
help: 'Flag to be used so that test files will be transpiled/run as soon as they are saved. Starts up the Suman server if it is not already live,' +
'and begins watching the files desired.'
},
{
names: ['watch-per', 'wp'],
type: 'string',
help: 'watch-per string must match a key in {suman.conf.js}.watch.per.'
},
{
names: ['rand', 'random'],
type: 'bool',
help: 'Flag to randomize tests.'
},
{
names: ['concurrency'],
type: 'integer',
help: 'Specifiy the maximum number of parallel child processes.'
},
{
names: ['src'],
type: 'string',
help: 'Specify single path to directory of Mocha test source files for conversion to Suman from Mocha.'
},
{
names: ['daemon', 'd'],
type: 'bool',
help: 'Allows certain Suman processes to run as a daemon.'
},
{
names: ['dest'],
type: 'string',
help: 'Specify single path as dest directory for conversion to Suman from Mocha.'
},
{
names: ['reporters'],
type: 'arrayOfString',
help: 'Specify name of reporters to be used deemed by your config file.'
},
{
names: ['test-paths-json'],
type: 'string',
help: 'Test paths as JSON array.'
},
{
names: ['replace-ext-with', 'replace-extension-with'],
type: 'string',
help: 'Replace test path strings.'
},
{
names: ['replace-match'],
type: 'string',
help: 'Replace test path strings.'
},
{
names: ['replace-with'],
type: 'string',
help: 'Test paths as JSON array.'
},
{
names: ['reporter-paths'],
type: 'arrayOfString',
help: 'Specify reporters by specifying path(s) to reporter module(s).'
},
{
names: ['postinstall'],
type: 'bool',
help: 'Using this option will (re)run the suman postinstall routine. Normally as a Suman user ' +
'you would want to run the "suman --repair" option instead of the the "suman --postinstall" option.'
},
{
names: ['install-globals'],
type: 'bool',
help: 'Run diagnostics to see if something may be wrong with your suman.conf.js file and/or project structure.'
},
{
names: ['diagnostics'],
type: 'bool',
help: 'Run diagnostics to see if something may be wrong with your suman.conf.js file and/or project structure.'
},
{
names: ['repair'],
type: 'bool',
help: 'Run the "--repair" option to (1) re-install Suman deps that may be corrupted; ' +
'(2) delete any stray lock files that may exist and should not exist; (3) ensure that certain files, such as ' +
'@run.sh, @transform.sh, @target, @src, have the correct permissions.'
},
{
names: ['browser'],
type: 'bool',
help: 'Tell Suman to run browser tests.'
},
{
names: ['force-transpile'],
type: 'bool',
help: 'Force transpile using @transform.sh and @run.sh.'
},
{
names: ['transpile', 't'],
type: 'bool',
help: 'Transpile tests to test-target.'
},
{
names: ['no-transpile', 'nt'],
type: 'bool',
help: 'Useful when the default is set to transpile:true in your config. Prevents transpilation and runs test files directly.'
},
{
names: ['no-run', 'nr'],
type: 'bool',
help: 'When --watch and --transpile are set to true, "--no-run" prevents Suman from executing the resulting tests, when a watched file changes on' +
'the filesystem. In other words, the file will only be transpiled but not executed as part of the watch process.'
},
{
names: ['full-stack-traces', 'fst'],
type: 'bool',
help: 'Full stack traces will be shown for all exceptions, including test failures.'
},
{
names: ['processes', 'procs'],
type: 'integer',
help: 'Override config value for maximum number of parallel Node.js processes.'
},
{
names: ['server', 's'],
type: 'bool',
help: 'Start the suman server manually.'
},
{
names: ['exec-arg'],
type: 'arrayOfString',
help: 'Pass an argument through command line to the executable.'
},
{
names: ['exec-args'],
type: 'string',
help: 'Pass exec arguments through command line.'
},
{
names: ['groups'],
type: 'bool',
help: 'Tell Suman to use the groups feature. If no arguments are passed, ' +
'all groups will be run. Otherwise, only the group ids/names passed will be run.'
},
{
names: ['config', 'cfg'],
type: 'string',
help: 'Path to the suman.conf.js file you wish to use.'
},
{
names: ['stdout-silent'],
type: 'bool',
help: 'Sends stdout for all test child processes to /dev/null'
},
{
names: ['stderr-silent'],
type: 'bool',
help: 'Sends stderr for all test child processes to /dev/null'
},
{
names: ['silent'],
type: 'bool',
help: 'Sends stdout/stderr for all test child processes to /dev/null'
},
{
names: ['tail'],
type: 'bool',
help: 'Option to tail the suman log files.'
}
];