UNPKG

1.45 kBJavaScriptView Raw
1'use strict';
2
3/**
4 * Metadata about various options of the `run` command
5 * @see module:lib/cli/run
6 * @module
7 * @private
8 */
9
10/**
11 * Dictionary of yargs option types to list of options having said type
12 * @type {{string:string[]}}
13 * @private
14 */
15exports.types = {
16 array: [
17 'extension',
18 'file',
19 'global',
20 'ignore',
21 'reporter-option',
22 'require',
23 'spec',
24 'watch-files',
25 'watch-ignore'
26 ],
27 boolean: [
28 'allow-uncaught',
29 'async-only',
30 'bail',
31 'check-leaks',
32 'color',
33 'delay',
34 'diff',
35 'exit',
36 'forbid-only',
37 'forbid-pending',
38 'full-trace',
39 'growl',
40 'inline-diffs',
41 'invert',
42 'list-interfaces',
43 'list-reporters',
44 'no-colors',
45 'recursive',
46 'sort',
47 'watch'
48 ],
49 number: ['retries'],
50 string: [
51 'config',
52 'fgrep',
53 'grep',
54 'opts',
55 'package',
56 'reporter',
57 'ui',
58 'slow',
59 'timeout'
60 ]
61};
62
63/**
64 * Option aliases keyed by canonical option name.
65 * Arrays used to reduce
66 * @type {{string:string[]}}
67 * @private
68 */
69exports.aliases = {
70 'async-only': ['A'],
71 bail: ['b'],
72 color: ['c', 'colors'],
73 fgrep: ['f'],
74 global: ['globals'],
75 grep: ['g'],
76 growl: ['G'],
77 ignore: ['exclude'],
78 invert: ['i'],
79 'no-colors': ['C'],
80 reporter: ['R'],
81 'reporter-option': ['reporter-options', 'O'],
82 require: ['r'],
83 slow: ['s'],
84 sort: ['S'],
85 timeout: ['t', 'timeouts'],
86 ui: ['u'],
87 watch: ['w']
88};