node-env-run
node-env-run copied to clipboard
Exit code of executed command is swollowed
It is a good practice to make your test command exit with non-zero code when one of the tests fails. This may be then interpreted easily by i.e. a CI and mark the CI job as failed. Unfortunately when you use node-env-run to pass environemnt variable to your tests, the exit code is always 0.
The below will always succeed (provide exit code 0) even though cucumberjs failed.
nodenv -E test.env --exec 'cucumberjs'