iefserge / test-plan

Count assertions and call function at the end

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SYNOPSIS

Count assertions and call function at the end

USAGE

var Plan = require('test-plan');

it('should be able to wait for two events', function(done) {
  var plan = new Plan(2, done);

  setTimeout(function() {
    plan.ok(true);
  }, 20);

  setTimeout(function() {
    plan.ok(true);
  }, 10);
});

LICENSE

MIT

About

Count assertions and call function at the end


Languages

Language:JavaScript 100.0%