start-server-and-test
Advanced tools
Comparing version 1.10.8 to 1.10.9
{ | ||
"name": "start-server-and-test", | ||
"description": "Starts server, waits for URL, then runs test command; when the tests end, shuts down server", | ||
"version": "1.10.8", | ||
"version": "1.10.9", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -97,3 +97,3 @@ "bugs": "https://github.com/bahmutov/start-server-and-test/issues", | ||
"ban-sensitive-files": "1.9.2", | ||
"cross-env": "6.0.3", | ||
"cross-env": "7.0.0", | ||
"dependency-check": "3.4.1", | ||
@@ -106,3 +106,3 @@ "deps-ok": "1.4.1", | ||
"minimist": "1.2.0", | ||
"mocha": "6.2.1", | ||
"mocha": "7.0.1", | ||
"pre-git": "3.17.1", | ||
@@ -120,3 +120,3 @@ "prettier-standard": "8.0.1", | ||
"debug": "4.1.1", | ||
"execa": "4.0.0", | ||
"execa": "3.4.0", | ||
"lazy-ass": "1.6.0", | ||
@@ -123,0 +123,0 @@ "ps-tree": "1.2.0", |
@@ -34,3 +34,3 @@ # start-server-and-test | ||
To execute all tests simply run `npm run ci` | ||
To execute all tests simply run `npm run ci`. | ||
@@ -41,16 +41,38 @@ ### Commands | ||
``` | ||
```shell | ||
# run http-server, then when port 8000 responds run Cypress tests | ||
start-server-and-test 'http-server -c-1 --silent' 8000 './node_modules/.bin/cypress run --record' | ||
``` | ||
or because `npm` scripts execute with `./node_modules/.bin` in the `$PATH`, you can mix global and locally installed tools: | ||
Because `npm` scripts execute with `./node_modules/.bin` in the `$PATH`, you can mix global and locally installed tools when using commands inside `package.json` file. For example, if you want to run a single spec file: | ||
```json | ||
{ | ||
"scripts": { | ||
"ci": "start-server-and-test 'http-server -c-1 --silent' 8080 'mocha e2e-spec.js'" | ||
} | ||
"scripts": { | ||
"ci": "start-server-and-test 'http-server -c-1 --silent' 8080 'cypress run --spec cypress/integration/location.spec.js'" | ||
} | ||
} | ||
``` | ||
Or you can move `http-server` part into its own `start` script, which is used by default and have the equivalent JSON | ||
```json | ||
{ | ||
"scripts": { | ||
"start": "http-server -c-1 --silent", | ||
"ci": "start-server-and-test 8080 'cypress run --spec cypress/integration/location.spec.js'" | ||
} | ||
} | ||
``` | ||
Here is another example that uses Mocha | ||
```json | ||
{ | ||
"scripts": { | ||
"ci": "start-server-and-test 'http-server -c-1 --silent' 8080 'mocha e2e-spec.js'" | ||
} | ||
} | ||
``` | ||
### Alias | ||
@@ -57,0 +79,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
20372
283
+ Addedexeca@3.4.0(transitive)
+ Addedp-finally@2.0.1(transitive)
- Removedexeca@4.0.0(transitive)
Updatedexeca@3.4.0