2
2
3
3
'use strict' ;
4
4
5
- var fs = require ( 'fs' ) ;
6
- var path = require ( 'path' ) ;
7
- var EOL = require ( 'os' ) . EOL ;
8
- var program = require ( 'commander' ) ;
9
- var Convert = require ( 'ansi-to-html' ) ;
5
+ const fs = require ( 'fs' ) ;
6
+ const path = require ( 'path' ) ;
7
+ const EOL = require ( 'os' ) . EOL ;
8
+ const program = require ( 'commander' ) ;
9
+ const Convert = require ( 'ansi-to-html' ) ;
10
10
11
- var _ = require ( '../lib/common/helper' ) ;
12
- var createRunner = require ( '../lib' ) . Runner ;
13
- var logger = require ( '../lib/common/logger' ) ;
14
- var format = require ( '../lib/common/logFormatter' ) ;
11
+ const _ = require ( '../lib/common/helper' ) ;
12
+ const createRunner = require ( '../lib' ) . Runner ;
13
+ const logger = require ( '../lib/common/logger' ) ;
14
+ const format = require ( '../lib/common/logFormatter' ) ;
15
15
16
- var options = {
16
+ const options = {
17
17
verbose : false ,
18
18
framework : 'mocha' ,
19
19
port : 3456 ,
@@ -23,19 +23,19 @@ var options = {
23
23
} ;
24
24
25
25
program
26
- . option ( '-f, --framework <s>' , 'Set test framework (defaults: ' + options . framework + ')' )
27
- . option ( '-p, --port <d>' , 'Set port for server (defaults: ' + options . port + ')' )
28
- . option ( '-d, --directory <s >' , 'Set directory for task runner (defaults: ' + options . directory + ')' )
29
- . option ( '-o, --output [s]' , 'Set output html file' )
30
- . option ( '-r, --reporter <s>' , 'Set reporter (default: Spec)' )
31
- . option ( '-c, --colors <s>' , 'Force enabling of colors (defaults: ' + options . colors + ')' )
32
- . option ( '-C, --no-colors' , 'Force disabling of colors' )
33
- . option ( '--require <name>' , 'Require the given module' )
34
- . option ( '--f_options <s>' , 'The options used for test framework itself' )
35
- . option ( '--coverage-ignore <s>' , 'Ignore RegExp used for macaca-coverage' )
36
- . option ( '--no-window' , 'Let Electron runs in silence' )
37
- . option ( '--parallel' , 'Let Electron run in parallel process' )
38
- . option ( '--verbose' , 'Displays more debugging information' )
26
+ . option ( '-f, --framework <s>' , 'Set test framework (defaults: ' + options . framework + ')' )
27
+ . option ( '-p, --port <d>' , 'Set port for server (defaults: ' + options . port + ')' )
28
+ . option ( '-d, --directory <items >' , 'Set directory for task runner (defaults: ' + options . directory + ')' , value => value . split ( ',' ) )
29
+ . option ( '-o, --output [s]' , 'Set output html file' )
30
+ . option ( '-r, --reporter <s>' , 'Set reporter (default: Spec)' )
31
+ . option ( '-c, --colors <s>' , 'Force enabling of colors (defaults: ' + options . colors + ')' )
32
+ . option ( '-C, --no-colors' , 'Force disabling of colors' )
33
+ . option ( '--require <name>' , 'Require the given module' )
34
+ . option ( '--f_options <s>' , 'The options used for test framework itself' )
35
+ . option ( '--coverage-ignore <s>' , 'Ignore RegExp used for macaca-coverage' )
36
+ . option ( '--no-window' , 'Let Electron runs in silence' )
37
+ . option ( '--parallel' , 'Let Electron run in parallel process' )
38
+ . option ( '--verbose' , 'Displays more debugging information' )
39
39
. parse ( process . argv ) ;
40
40
41
41
_ . merge ( options , _ . getConfig ( program ) ) ;
0 commit comments