We currently run our integration test suite (via Cypress) against the dev server (react-scripts start). start-server-and-test is very handy for starting the server, waiting for it to listen on a port, and then shut down the server after tests are run.
However, if there's an error that prevents the app from building (ex: a missing dependency), it has to get all the way through the integration test suite, running every test and failing them due to the build error thrown by Webpack. These builds would fail much faster if the dev server actually immediately quit with exit code 1 if there was a build error.
Would it be reasonable to have this behavior if CI=true? I'll happily write the PR, just want to check on my approach before I sink any time into it.
We currently run our integration test suite (via Cypress) against the dev server (
react-scripts start). start-server-and-test is very handy for starting the server, waiting for it to listen on a port, and then shut down the server after tests are run.However, if there's an error that prevents the app from building (ex: a missing dependency), it has to get all the way through the integration test suite, running every test and failing them due to the build error thrown by Webpack. These builds would fail much faster if the dev server actually immediately quit with exit code 1 if there was a build error.
Would it be reasonable to have this behavior if
CI=true? I'll happily write the PR, just want to check on my approach before I sink any time into it.