Skip to content

Commit 4130f0d

Browse files
committed
docs: document --config for e2e-nightwatch
1 parent e4d67d6 commit 4130f0d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/@vue/cli-plugin-e2e-nightwatch/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
```
1414
--url run e2e tests against given url instead of auto-starting dev server
15+
--config use custom nightwatch config file (overrides internals)
1516
-e, --env specify comma-delimited browser envs to run in (default: chrome)
1617
-t, --test sepcify a test to run by name
1718
-f, --filter glob to filter tests by filename
@@ -23,6 +24,8 @@
2324

2425
We've pre-configured Nightwatch to run with Chrome by default. If you wish to run e2e tests in additional browsers, you will need to add a `nightwatch.config.js` or `nightwatch.json` in your project root to configure additional browsers. The config will be merged into the [internal Nightwatch config](https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-e2e-nightwatch/nightwatch.config.js).
2526

27+
Alternatively, you can completely replace the internal config with a custom config file using the `--config` option.
28+
2629
Consult Nightwatch docs for [configuration options](http://nightwatchjs.org/gettingstarted#settings-file) and how to [setup browser drivers](http://nightwatchjs.org/gettingstarted#browser-drivers-setup).
2730

2831
## Installing in an Already Created Project

packages/@vue/cli-plugin-e2e-nightwatch/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = (api, options) => {
1313
usage: 'vue-cli-service e2e [options]',
1414
options: {
1515
'--url': 'run e2e tests against given url instead of auto-starting dev server',
16+
'--config': 'use custom nightwatch config file (overrides internals)',
1617
'-e, --env': 'specify comma-delimited browser envs to run in (default: chrome)',
1718
'-t, --test': 'sepcify a test to run by name',
1819
'-f, --filter': 'glob to filter tests by filename'
@@ -41,7 +42,7 @@ module.exports = (api, options) => {
4142
userOptions = require(userOptionsPath)
4243
}
4344
process.env.VUE_NIGHTWATCH_USER_OPTIONS = JSON.stringify(userOptions || {})
44-
45+
4546
rawArgs.push('--config', require.resolve('./nightwatch.config.js'))
4647
}
4748

0 commit comments

Comments
 (0)