@@ -8,16 +8,17 @@ pkg = require("../package.json")
8
8
updater ({pkg : pkg, updateCheckInterval : human (" one hour" )}).notify ()
9
9
10
10
parseOpts = (opts ) ->
11
- _ .pick (opts, " spec" , " reporter" , " path" , " destination" , " port" , " env" , " cypressVersion" , " config" )
11
+ _ .pick (opts, " spec" , " reporter" , " reporterOptions " , " path" , " destination" , " port" , " env" , " cypressVersion" , " config" )
12
12
13
13
descriptions = {
14
- destination : " destination path to extract and install Cypress to"
15
- spec : " runs a specific spec file. defaults to 'all'"
16
- reporter : " runs a specific mocha reporter. pass a path to use a custom reporter. defaults to 'spec'"
17
- port : " runs Cypress on a specific port. overrides any value in cypress.json. defaults to '2020'"
18
- env : " sets environment variables. separate multiple values with a comma. overrides any value in cypress.json or cypress.env.json"
19
- config : " sets configuration values. separate multiple values with a comma. overrides any value in cypress.json."
20
- version : " installs a specific version of Cypress"
14
+ destination : " destination path to extract and install Cypress to"
15
+ spec : " runs a specific spec file. defaults to 'all'"
16
+ reporter : " runs a specific mocha reporter. pass a path to use a custom reporter. defaults to 'spec'"
17
+ reporterOptions : " options for the mocha reporter. defaults to 'null'"
18
+ port : " runs Cypress on a specific port. overrides any value in cypress.json. defaults to '2020'"
19
+ env : " sets environment variables. separate multiple values with a comma. overrides any value in cypress.json or cypress.env.json"
20
+ config : " sets configuration values. separate multiple values with a comma. overrides any value in cypress.json."
21
+ version : " installs a specific version of Cypress"
21
22
}
22
23
23
24
text = (d ) ->
@@ -57,23 +58,25 @@ module.exports = ->
57
58
.command (" run [project]" )
58
59
.usage (" [project] [options]" )
59
60
.description (" Runs Cypress Tests Headlessly" )
60
- .option (" -s, --spec <spec>" , text (" spec" ))
61
- .option (" -r, --reporter <reporter>" , text (" reporter" ))
62
- .option (" -p, --port <port>" , text (" port" ))
63
- .option (" -e, --env <env>" , text (" env" ))
64
- .option (" -c, --config <config>" , text (" config" ))
61
+ .option (" -s, --spec <spec>" , text (" spec" ))
62
+ .option (" -r, --reporter <reporter>" , text (" reporter" ))
63
+ .option (" -o, --reporter-options <reporter-options>" , text (" reporterOptions" ))
64
+ .option (" -p, --port <port>" , text (" port" ))
65
+ .option (" -e, --env <env>" , text (" env" ))
66
+ .option (" -c, --config <config>" , text (" config" ))
65
67
.action (project, opts) ->
66
68
require (" ./commands/run" )(project, parseOpts (opts))
67
69
68
70
program
69
71
.command (" ci [key]" )
70
72
.usage (" [key] [options]" )
71
73
.description (" Runs Cypress in CI Mode" )
72
- .option (" -s, --spec <spec>" , text (" spec" ))
73
- .option (" -r, --reporter <reporter>" , text (" reporter" ))
74
- .option (" -p, --port <port>" , text (" port" ))
75
- .option (" -e, --env <env vars>" , text (" env" ))
76
- .option (" -c, --config <config>" , text (" config" ))
74
+ .option (" -s, --spec <spec>" , text (" spec" ))
75
+ .option (" -r, --reporter <reporter>" , text (" reporter" ))
76
+ .option (" -o, --reporter-options <reporter-options>" , text (" reporterOptions" ))
77
+ .option (" -p, --port <port>" , text (" port" ))
78
+ .option (" -e, --env <env vars>" , text (" env" ))
79
+ .option (" -c, --config <config>" , text (" config" ))
77
80
.action (key, opts) ->
78
81
require (" ./commands/ci" )(key, parseOpts (opts))
79
82
@@ -130,4 +133,4 @@ module.exports = ->
130
133
# # then display the help
131
134
program .help ()
132
135
133
- return program
136
+ return program
0 commit comments