Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit c0a8883

Browse files
committed
Add cucumber:mongo script
Following @appinteractive's suggestions `|| sleep infinity` here will make sure the command for starting mongo won't terminate the parallel execution of `concurrently`. That would be the case if your mongo is already running, e.g. because of a system-wide mongodb daemon. But we don't want to terminate the commmand because that would in turn terminate `concurrently`. Instead we want the last command `cucumber-js` to exit first.
1 parent c609c27 commit c0a8883

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"dev:win": "npm run clear && concurrently \"mongod --dbpath /data/db\" \"wait-on tcp:27017&&cross-env NODE_ENV=development&&cross-env DEBUG=feathers&& nodemon --inspect server/\"",
4747
"mocha": "npm run clear && $npm_package_config_mocha",
4848
"mocha:mongo": "$npm_package_config_concurrently '$npm_package_config_mongoDev &>/dev/null' 'wait-on tcp:27017 && npm run mocha'",
49-
"cucumber": "npm run clear && concurrently --kill-others --success first 'cross-env NODE_ENV=test node server/' 'wait-on tcp:3030 && cross-env NODE_ENV=test cucumber-js'"
49+
"cucumber": "npm run clear && concurrently --kill-others --success first 'cross-env NODE_ENV=test node server/' 'wait-on tcp:3030 && cross-env NODE_ENV=test cucumber-js'",
50+
"cucumber:mongo": "npm run clear && concurrently --kill-others --success first '$npm_package_config_mongoDev &>/dev/null || sleep infinity' 'wait-on tcp:27017 && cross-env NODE_ENV=test node server/' 'wait-on tcp:3030 && cross-env NODE_ENV=test cucumber-js'"
5051
},
5152
"config": {
5253
"mongoDev": "mongod --dbpath data --quiet",

0 commit comments

Comments
 (0)