start-server-and-test
Advanced tools
Comparing version 1.15.3 to 1.15.4
{ | ||
"name": "start-server-and-test", | ||
"description": "Starts server, waits for URL, then runs test command; when the tests end, shuts down server", | ||
"version": "1.15.3", | ||
"version": "1.15.4", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/bahmutov/start-server-and-test/issues", |
@@ -180,2 +180,4 @@ # start-server-and-test | ||
Default expected value is 200. | ||
## `npx` and `yarn` | ||
@@ -182,0 +184,0 @@ |
@@ -21,2 +21,6 @@ #!/usr/bin/env node | ||
if (!namedArguments.expect) { | ||
namedArguments.expect = 200 | ||
} | ||
utils.printArguments({ services, test, namedArguments }) | ||
@@ -23,0 +27,0 @@ |
@@ -133,2 +133,8 @@ // @ts-check | ||
la( | ||
is.number(namedArguments.expect), | ||
'expected status should be a number', | ||
namedArguments.expect | ||
) | ||
if (services.length === 1) { | ||
@@ -135,0 +141,0 @@ const runTests = runTheTests(test) |
@@ -221,2 +221,8 @@ const la = require('lazy-ass') | ||
function printArguments ({ services, test, namedArguments }) { | ||
la( | ||
is.number(namedArguments.expect), | ||
'expected status code should be a number', | ||
namedArguments.expect | ||
) | ||
services.forEach((service, k) => { | ||
@@ -223,0 +229,0 @@ console.log('%d: starting server using command "%s"', k + 1, service.start) |
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
29708
389
360
2