-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: start and wait for multiple services 248 (#249)
* chore: start refactoring start and url parameters * chore: refactor a little more * chore: add sinon and global sandbox * chore: add sinon * chore: normalize all start commands * lint * chore: parse second service * add another test * move print into utils * print multiple services * refactoring * feat: support 2 services at once * add to Travis CI * update README
- Loading branch information
Showing
10 changed files
with
830 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,170 @@ | ||
exports['utils getArguments allows 5 arguments 1'] = { | ||
"args": [ | ||
"start", | ||
"6000", | ||
"start:web", | ||
"6010", | ||
"test" | ||
], | ||
"parsed": { | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:6000" | ||
] | ||
}, | ||
{ | ||
"start": "start:web", | ||
"url": [ | ||
"http://localhost:6010" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
} | ||
|
||
exports['utils getArguments determines NPM script for each command 1'] = { | ||
"args": [ | ||
"startA", | ||
"6000", | ||
"startB", | ||
"6010", | ||
"testC" | ||
], | ||
"parsed": { | ||
"services": [ | ||
{ | ||
"start": "npm run startA", | ||
"url": [ | ||
"http://localhost:6000" | ||
] | ||
}, | ||
{ | ||
"start": "npm run startB", | ||
"url": [ | ||
"http://localhost:6010" | ||
] | ||
} | ||
], | ||
"test": "npm run testC" | ||
} | ||
} | ||
|
||
exports['utils getArguments handles 3 arguments with http-get url 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http-get://localhost:8080" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http-get://localhost:8080" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments returns 3 arguments 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:8080" | ||
"args": [ | ||
"start", | ||
"8080", | ||
"test" | ||
], | ||
"test": "npm run test" | ||
"parsed": { | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:8080" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
} | ||
|
||
exports['utils getArguments returns 3 arguments with url 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:8080" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:8080" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments understands custom commands 1'] = { | ||
"start": "custom-command --with argument", | ||
"url": [ | ||
"http://localhost:3000" | ||
"services": [ | ||
{ | ||
"start": "custom-command --with argument", | ||
"url": [ | ||
"http://localhost:3000" | ||
] | ||
} | ||
], | ||
"test": "test-command --x=1" | ||
} | ||
|
||
exports['utils getArguments understands several ports 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000", | ||
"http://localhost:4000", | ||
"http://localhost:5000" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000", | ||
"http://localhost:4000", | ||
"http://localhost:5000" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments understands single :port 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments understands single port 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:3000" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments understands start plus url 1'] = { | ||
"start": "start-server", | ||
"url": [ | ||
"http://localhost:6000" | ||
"services": [ | ||
{ | ||
"start": "start-server", | ||
"url": [ | ||
"http://localhost:6000" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} | ||
|
||
exports['utils getArguments understands url plus test 1'] = { | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:6000" | ||
"services": [ | ||
{ | ||
"start": "npm run start", | ||
"url": [ | ||
"http://localhost:6000" | ||
] | ||
} | ||
], | ||
"test": "npm run test" | ||
} |
Oops, something went wrong.