Extends Tape with new assertions
$ npm install --save-dev extend-tape
import tape from 'tape';
import addAssertions from 'extend-tape';
// add a new assertion: biggerThan
const test = addAssertions(tape, {
biggerThan (a, b) {
this.ok(b > a, `is bigger than ${a}`);
}
});
test('5 is bigger than 4', (t) => {
t.biggerThan(4, 5);
t.end();
});
$ npm install
$ npm test