Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tapa (add TAP helpers)

npm version npm downloads Build Status Windows Tests Donate

Add helpers to your favorite javascript TAP framework.

Tapa is a wide variety of 🇪🇸 Spanish food appetizers. Now you can add any tapa to your TAP menu 🍴

Installation

npm

npm install tapa --save-dev

Usage

var addTapa = require('tapa');
var tape = require('tape');

// add a new assertion: biggerThan
var test = addTapa(tape, {
  biggerThan (a, b) {
    this.ok(b > a, 'is bigger than ' + a);
  }
});

var count = 0;

test('a set of some tests', function (t) {
  t.test('A', function (t) {
    t.biggerThan(4, 5);
    t.equal(++count, 1);
    t.end();
  });

  t.test('B', function (t) {
    t.test('b1', function (t) {
      t.test('bb1', function (t) {
        t.biggerThan(4, 5);
        t.equal(++count, 2);
        t.end();
      });
      t.end();
    });

    t.test('b2', function (t) {
      t.biggerThan(4, 5);
      t.equal(++count, 3);
      t.end();
    });

    t.test('b3', function (t) {
      t.equal(++count, 4);
      t.end();
    });

    t.end();
  });

  t.test('C', function (t) {
    t.equal(++count, 5);
    t.end();
  });

  t.biggerThan(4, 5);
  t.end();
});

test('a test', function (t) {
  t.biggerThan(4, 5);
  t.equal(++count, 6);
  t.end();
});

TAP Frameworks

Work with tap and tape on node and browser

Contributing

  • Documentation improvement
  • Feel free to send any PR

License

ISC

About

Add helpers to TAP Frameworks

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages