tap-test-helpers

test helpers for node tap

npm install tap-test-helpers
6 downloads in the last week
12 downloads in the last month

tap-test-helpers

Build Status

Install

npm install tap-test-helpers

Docs

Yuidocs documentation here

  • link only works when checkout repo and preview README locally

API Summary

TestHelper = require.('tap-test-helpers');

Api Helper Class

.Api.methodsExposed(['method', 'names'], module)

// 1 test shd fail; Object.twoPot is not exposed
TestHelper.Api.methodsExposed(['onePot', 'twoPot', 'threePot'], {
    'onePot': function(argument) {},
    'threePot': function(argument) {}
});

Oop Helper Class

.Oop.inheritsCheckProto(ChildClass, ParentClass)

function A() {};
A.prototype.foo = function(x, y) {
    return x + y;
};

function B() {};
B.prototype.foo = function(x, y) {
    return 2 + this.super_.foo(x, y);
};

// all tests PASS
require.('extasy').extendCtor(B, A);
TestHelper.Oop.inheritsCheckProto(B, A);
npm loves you