0.1.0 • Published 9 years ago
chai-rage v0.1.0
chai-rage
A plugin for Chai Assertion Library that allows you to rage in your test code.
It basically allows you to use custom words in an assertion chain. The added words do not do anything.
WARNING: Source code contains bad words!
In case you didn't get it yet; do not use this plugin for anything serious.
Installation
npm install --save-dev chai-rage
Example
var chai = require('chai');
var expect = chai.expect;
// Initialize with custom rage words. Look in the source code for built in words.
var rage = require('chai-rage')(['anarray', 'ofof', 'badword', 'ssss']);
chai.use(rage);
describe('some test', function () {
it('allows use of custom words', function () {
expect(['test', 'test2']).to.have.badword.length(2);
expect(['test', 'test2']).to.not.be.a.badword('integer');
});
});
See examples.