Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 6f31b56

Browse files
committed
chore(package): npm start now brings up the testapp
Closes #712
1 parent 74761e8 commit 6f31b56

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ Start up a selenium server. By default, the tests expect the selenium server to
8282

8383
Protractor's test suite runs against the included testapp. Start that up with
8484

85-
cd testapp
86-
./scripts/web-server.js
85+
npm start
8786

8887
Then run the tests with
8988

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
},
4545
"main": "lib/protractor.js",
4646
"scripts": {
47-
"test": "scripts/test.js"
47+
"test": "scripts/test.js",
48+
"start": "testapp/scripts/web-server.js"
4849
},
4950
"license": "MIT",
5051
"version": "0.21.0",

testapp/scripts/web-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var express = require('express');
44
var util = require('util');
55
var testApp = express();
66
var DEFAULT_PORT = process.env.HTTP_PORT || 8000;
7-
var testAppDir = process.cwd();
7+
var testAppDir = require('path').resolve(__dirname, '..');
88

99
var main = function(argv) {
1010
var port = Number(argv[2]) || DEFAULT_PORT;

0 commit comments

Comments
 (0)