diff --git a/README.md b/README.md index e84387195..bfcadb9eb 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,7 @@ Start up a selenium server. By default, the tests expect the selenium server to Protractor's test suite runs against the included testapp. Start that up with - cd testapp - ./scripts/web-server.js + npm start Then run the tests with diff --git a/package.json b/package.json index d5dc5a60d..a2f368fd6 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ }, "main": "lib/protractor.js", "scripts": { - "test": "scripts/test.js" + "test": "scripts/test.js", + "start": "testapp/scripts/web-server.js" }, "license": "MIT", "version": "0.21.0", diff --git a/testapp/scripts/web-server.js b/testapp/scripts/web-server.js index e52a495f5..a33a215a8 100755 --- a/testapp/scripts/web-server.js +++ b/testapp/scripts/web-server.js @@ -4,7 +4,7 @@ var express = require('express'); var util = require('util'); var testApp = express(); var DEFAULT_PORT = process.env.HTTP_PORT || 8000; -var testAppDir = process.cwd(); +var testAppDir = require('path').resolve(__dirname, '..'); var main = function(argv) { var port = Number(argv[2]) || DEFAULT_PORT;