GithubHelp home page GithubHelp logo

tape-bdd's Introduction

tape-bdd Build Status NPM Version License Coverage Status

Tape-BDD essentially wraps tape and provides a more Mocha-style interface for BDD and automatically handling things like TAP planning and assertion names. It assumes one assertion per test.

Usage

var describe = require('tape-bdd');

describe('plus', function(it) {
  // assert has the same API as tape's test object

  // 'it' is a function that will handle thrown
  // errors gracefully and set the number of tests
  // for the suite for assert.plan().

  it('should add one and two', function(assert) {
    assert.equal(1 + 3, 3);
  });

  it('should add strings', function(assert) {
    assert.equal('foo' + 'bar', 'foobar');
  });
});

Is equivalent to:

var test = require('tape');

test('plus', function(t) {
  t.plan(2);

  t.equal(1 + 2, 3, 'should add one and two');

  t.equal('foo' + 'bar', 'foobar', 'should add strings');
});

tape-bdd's People

Contributors

l8d avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.