Try to Tape [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
August 29, 2020 ยท View on GitHub
Wrap tape async functions and show error on reject. Bundled with supertape.
Install
npm i try-to-tape
Example
const tryToTape = require('try-to-tape');
const tape = tryToTape(require('tape'));
test('lib: arguments', async (t) => {
throw Error('hello');
// will call t.fail with an error
// will call t.end
t.end();
});
Related
- try-catch - functional try-catch wrapper.
- try-to-catch - functional try-catch wrapper for promises.
License
MIT