check if env vars are set

This commit is contained in:
Girish Ramakrishnan 2015-11-25 00:34:37 -08:00
parent 74e09fa601
commit 24893502f5

View file

@ -23,7 +23,10 @@ describe('Application life cycle test', function () {
this.timeout(0);
var server, browser = new require('selenium-webdriver/firefox').Driver();
before(function () {
before(function (done) {
if (!process.env.USERNAME) return done(new Error('USERNAME env var not set'));
if (!process.env.PASSWORD) return done(new Error('PASSWORD env var not set'));
var seleniumJar= require('selenium-server-standalone-jar');
var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer;
server = new SeleniumServer(seleniumJar.path, { port: 4444 });