I am trying to create a script to run an end-to-end testing suite. I am currently using concurrently and the angular cli, like so:
"e2e": "concurrently \"ng e2e --proxy-config proxy.conf.json\" \"cross-env NODE_ENV=development node server\"",
It runs fine, but my issue is that obviously whilst the ng e2e
command completes, my backend server does not. Is there any way to get the whole command to finish when the tests are complete?
Found it! Concurrently has already thought of this and helpfully implemented the following switches --kill-others --success first
.
--kill-others
means "if one command completes, kill the other and --success first
means "if the first command is successful return a success code for the whole concurrently command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With