mantoni/mochify.js

Errors do not exit with code 1

Closed this issue · 2 comments

When an error occurs within the test, I see a logged output of

Error: Exit 1

But the process itself does not exit with code 1. This creates false positives in systems like jenkins that rely on the exit code to be accurate.

I use Mochify with Jenkins all the time and the exit code is 1 for failing tests.

Can you provide an example where this does not work as expected?

@mantoni i realized that in our own runner we weren't listening for the error event and doing process.exit(1). The solution I came to locally before i discovered this was to add process.exit(1) to here. We can close this.