Skip to content

Commit

Permalink
fix: test cross-env fix, close #126
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Nov 20, 2018
1 parent fda9f7b commit 812f267
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ script:
- npm run demo6
- npm run demo7
- START_SERVER_AND_TEST_INSECURE=1 npm run demo9
- npm run demo-cross-env
after_success:
- npm run travis-deploy-once "npm run semantic-release"
branches:
Expand Down
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"start-multiple": "node test/multiple-servers.js",
"start-https": "node test/https-server.js",
"start-fail": "node test/server-fail.js",
"start-cross-env": "cross-env FOO=bar node test/server.js",
"test2": "curl http://127.0.0.1:9000",
"test3": "curl http://127.0.0.1:9000 && curl http://127.0.0.1:9001",
"test4": "curl --insecure https://127.0.0.1:9000",
Expand All @@ -89,10 +90,12 @@
"demo8": "node bin/start.js start-multiple \":9000|:9001\" test3",
"demo9": "node bin/start.js start-https \"https://127.0.0.1:9000\" test4",
"demo10": "node bin/start.js start-fail http://127.0.0.1:9000 test",
"demo-cross-env": "node bin/start.js start-cross-env 9000",
"travis-deploy-once": "travis-deploy-once"
},
"devDependencies": {
"ban-sensitive-files": "1.9.2",
"cross-env": "5.2.0",
"dependency-check": "3.2.1",
"deps-ok": "1.4.1",
"dont-crack": "1.2.1",
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function startAndTest ({ start, url, test }) {
process.kill(child.PID, 'SIGINT')
} catch (e) {
if (e.code === 'ESRCH') {
console.log(`Child process ${child.PID} exited before trying to stop it`)
console.log(
`Child process ${child.PID} exited before trying to stop it`
)
} else {
throw e
}
Expand Down

0 comments on commit 812f267

Please sign in to comment.