Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

start-server-and-test

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

start-server-and-test - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

5

bin/start.js

@@ -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>')

9

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc