9

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?

RobC
  • 22,977
  • 20
  • 73
  • 80
George Edwards
  • 8,979
  • 20
  • 78
  • 161

1 Answers1

13

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.

George Edwards
  • 8,979
  • 20
  • 78
  • 161