Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/techjacker/tap-test-helpers

test helpers for isaac's node-tap test framework
https://github.com/techjacker/tap-test-helpers

Last synced: 15 days ago
JSON representation

test helpers for isaac's node-tap test framework

Awesome Lists containing this project

README

        

# tap-test-helpers

[![Build Status](https://secure.travis-ci.org/techjacker/tap-test-helpers.png)](http://travis-ci.org/techjacker/tap-test-helpers)

### Install
```Shell
npm install tap-test-helpers
```

### Docs
[Yuidocs documentation here](docs/index.html)
- 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)```

```JavaScript
// 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)```

```JavaScript
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);
```