taperr
fire once. tape error events for t.fail(msg)
t.fail(msg)
- tape's deliberate failure mechanism uses a normal style data message signature
- you can fit
t.fail
flat into an EventEmitter's callback spot - organize intentional error handlers triggered in tests.
- clean up unconscionable promise APIs:
- normalize handlers given as the second error callback to
.then()
scenarios.
- normalize handlers given as the second error callback to
- to find and report uncaught errors, you're probably looking for tape-catch
install:
$ npm i taperr
basic idea:
//call `.err(er){ }` to raise 'error' eventserr //the implicit parameter gets passed to t.fail( err ), lighting up a tape console
example:
'headless osx chromedriver' { t;};
test:
$ npm t