Skip to content

atabel/extend-tape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extend-tape

npm npm Build Status

Extends Tape with new assertions

Install

$ npm install --save-dev extend-tape

How to use

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();
});

Run tests

$ npm install
$ npm test