function adaptArgv (argv) {
  // take every remaining argument and treat it as a test file
  // this allows to run `node test/e2e/runner.js test/e2e/basic.js`
  argv.retries = process.env.CI ? 1 : 0
  argv.test = argv['_'].slice(0)

  if (argv.c === DEFAULT_CONFIG && argv.config === DEFAULT_CONFIG) {
    argv.config = argv.c = NW_CONFIG
  }
  // Nightwatch does not accept an array with one element
  if (argv.test.length === 1) argv.test = argv.test[0]

  // debugging easily
  // console.log(argv)
  // process.exit(0)
}
Running tests

By default tests are run locally on chrome headless
$ node test/e2e/runner.js

You can run a specific test by passing it, or pass various tests
$ node test/e2e/runner.js test/e2e/specs/basic.js test/e2e/specs/redirect.js

You can specify a list of browsers to run from nightwatch.config.js with -e separated by a comma
$ node test/e2e/runner.js -e safari,firefox

If you are already running the dev server with `yarn run serve`, you can pass the --dev option to avoid launching the server
$ node test/e2e/runner.js --dev
**Make sure to pass the option at the end**

__For maintainers only__
You can trigger tests on Browserstack on other browsers by passing the --local option
It's also required to pass the list of browsers to test on to avoid launching too many tests. Available options are located inside nightwatch.browserstack.js
$ node test/e2e/runner.js --local -e ie,chrome50