start-server-and-test
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -16,2 +16,7 @@ #!/usr/bin/env node | ||
url = utils.normalizeUrl(args[0]) | ||
} else if (args.length === 2 && utils.isUrlOrPort(args[1])) { | ||
// passed start command and url/port | ||
// like "start-server 8080" | ||
start = args[0] | ||
url = utils.normalizeUrl(args[1]) | ||
} else { | ||
@@ -18,0 +23,0 @@ la(args.length === 3, 'expect: <start script name> <url> <test script name>') |
{ | ||
"name": "start-server-and-test", | ||
"description": "Starts server, waits for URL, then runs test command; when the tests end, shuts down server", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -81,3 +81,5 @@ "bugs": "https://github.com/bahmutov/start-server-and-test/issues", | ||
"demo3": "node bin/start.js start-with-child http://127.0.0.1:9000 test", | ||
"demo4": "node bin/start.js 9000" | ||
"demo4": "node bin/start.js 9000", | ||
"demo5": "node bin/start.js start-with-child 9000", | ||
"travis-deploy-once": "travis-deploy-once" | ||
}, | ||
@@ -97,3 +99,4 @@ "devDependencies": { | ||
"simple-commit-message": "3.3.2", | ||
"standard": "11.0.1" | ||
"standard": "11.0.1", | ||
"travis-deploy-once": "4.4.1" | ||
}, | ||
@@ -100,0 +103,0 @@ "dependencies": { |
@@ -54,3 +54,3 @@ # start-server-and-test | ||
You can also shorten local url to just port | ||
You can also shorten local url to just port, the code below is equivalent to checking `http://localhost:8080`. | ||
@@ -67,2 +67,14 @@ ```json | ||
You can provide first start command, port (or url) and implicit `test` command | ||
```json | ||
{ | ||
"scripts": { | ||
"start-it": "npm start", | ||
"test": "mocha e2e-spec.js", | ||
"ci": "server-test start-it 8080" | ||
} | ||
} | ||
``` | ||
## Note for webpack-dev-server users | ||
@@ -69,0 +81,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11563
111
142
14