$ cnpm install try-to-tape
Wrap tape async functions and show error on reject.
npm i try-to-tape
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();
});
MIT
Copyright 2013 - present © cnpmjs.org | Home |