From 24893502f558b5e87860c73fb054b8b52e41709b Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 25 Nov 2015 00:34:37 -0800 Subject: [PATCH] check if env vars are set --- test/test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index b58c65b..10d6d56 100755 --- a/test/test.js +++ b/test/test.js @@ -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 });