@@ -13,7 +13,8 @@ module.exports = (api, options) => {
13
13
'--use-selenium' : 'use Selenium standalone server instead of chromedriver or geckodriver' ,
14
14
'-e, --env' : 'specify comma-delimited browser envs to run in (default: chrome)' ,
15
15
'-t, --test' : 'specify a test to run by name' ,
16
- '-f, --filter' : 'glob to filter tests by filename'
16
+ '-f, --filter' : 'glob to filter tests by filename' ,
17
+ '--command' : 'vue-cli-service command to run (default: serve)'
17
18
} ,
18
19
details :
19
20
`All Nightwatch CLI options are also supported.\n` +
@@ -42,7 +43,7 @@ module.exports = (api, options) => {
42
43
}
43
44
44
45
// remove args
45
- ; [ 'url' , 'mode' ] . forEach ( toRemove => removeArg ( rawArgs , toRemove ) )
46
+ ; [ 'url' , 'mode' , 'command' ] . forEach ( toRemove => removeArg ( rawArgs , toRemove ) )
46
47
// remove flags
47
48
; [ 'headless' , 'use-selenium' , 'parallel' ] . forEach ( toRemove => removeArg ( rawArgs , toRemove , 0 ) )
48
49
@@ -100,13 +101,13 @@ module.exports.defaultModes = {
100
101
}
101
102
102
103
function startDevServer ( args , api ) {
103
- const { url } = args
104
+ const { url, command } = args
104
105
105
106
if ( url ) {
106
107
return Promise . resolve ( { url } )
107
108
}
108
109
109
- return api . service . run ( 'serve' )
110
+ return api . service . run ( command || 'serve' )
110
111
}
111
112
112
113
async function loadNightwatchConfig ( rawArgs , api ) {
0 commit comments