mocha-prepare icon indicating copy to clipboard operation
mocha-prepare copied to clipboard

unprepare hook: exitcode and throws error

Open FelipeBarrosCruz opened this issue 6 years ago • 1 comments

Purpose: returns exitcode in unprepare hook and throws error if unprepare hook receive an error by param.

Scenario 1: I need to gracefully close some connections but someone returns an error, then pass by done callback in unprepare context the error.

Scenario 2: I need to get the Mocha assertion exit code to do some logic issue in unprepare context.

FelipeBarrosCruz avatar Dec 20 '18 12:12 FelipeBarrosCruz

I also would like my test process to fail if my un prepareHook fails.

Thanks @FelipeBarrosCruz, using your fork now, iot works fine ! :+1:

QuentinFarizon avatar Apr 08 '20 16:04 QuentinFarizon