This is just the Assert API from Chai.js. This builds upon my Assertive Chai project, and tailors it for use with Tape.
I borrowed the unit tests from Chai.js. :)
-
Chai.js requires ECMAScript 5, making it a poor choice for projects that need to span a wide variety of browsers
-
I don't feel BDD-style assertions are worth the hassle of having to learn what is frequently an inconsistent API
-
BDD makes more sense at the test framework level, and it's easy to integrate Chai.js (and this library) with any test framework you like
Tape Chai.js modifies the Test
prototype provided by Tape.
npm install tape --save-dev
npm install tape-chai --save-dev
var test = require('tape');
require('tape-chai');
test('[] is an Array', function (t) {
t.isArray([]);
t.end();
});
Use Browserify
npm test
Use Browserify
npm run-script compile
Then load tests/index.html in your browser.