Skip to content

Instantly share code, notes, and snippets.

@dotfold
Created December 14, 2016 21:27
Show Gist options
  • Save dotfold/372514915532514c9abf0df02303fcc6 to your computer and use it in GitHub Desktop.
Save dotfold/372514915532514c9abf0df02303fcc6 to your computer and use it in GitHub Desktop.
// package.json scripts
"test:e2e-setup": "mkdir -p bin && node ./test/testSupport/selenium-download.js",
"test:e2e": "nightwatch --config ./test/e2e/conf/nightwatch.conf.js -e default",
// test/testSupport/selenium-download.js
var selenium = require('selenium-download')
selenium.ensure('./bin', function (error) {
if (error) {
console.error(error ? error.stack : 'Could not download selenium, most likely a network issue and not with `selenium-download`.')
process.exit(0)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment