Tape Chai.js
What?
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. :)
Why?
-
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
How?
Tape Chai.js modifies the Test
prototype provided by Tape.
Node.js
npm install tape --save-devnpm install tape-chai --save-dev
var test = ;; ;
Browser
Use Browserify
Development
Node.js
npm test
Browser
Use Browserify
npm run-script compile
Then load tests/index.html in your browser.