coderaiser / try-to-tape

wrap tape async functions and show error on reject

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Try to Tape NPM version Dependency Status Build Status Coverage Status

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

License

MIT

About

wrap tape async functions and show error on reject

License:MIT License


Languages

Language:JavaScript 100.0%