magic-tape

0.1.0 • Public • Published

magic-tape

Wrapper around tape that adds a few additional goodies. Note that you will also want to include tape as one of your project's dependencies if you want to use the tape testrunner command.

Before

var tape = require('tape');

tape('apples', function(assert) {
    assert.ok(true, 'apples are great!');
    assert.end();
});

After

var tape = require('magic-tape');

tape('apples', function(assert) {
    assert.ok(true, 'apples are great!');
    assert.end();
});

Goodies

tape -g <pattern>
tape --grep <pattern>

Register and run only the tests that match <pattern>.

var tape = require('magic-tape');
tape.beforeEach('testName', {}, function(assert) {
    assert.end();
});

Register and run a test once before all other tests.

var tape = require('magic-tape');
tape.afterEach('testName', {}, function(assert) {
    assert.end();
});

Register and run a test once after all other tests.

Readme

Keywords

none

Package Sidebar

Install

npm i magic-tape

Weekly Downloads

17

Version

0.1.0

License

none

Last publish

Collaborators

  • mapbox-admin