chai-rage

0.1.0 • Public • Published

chai-rage

NPM

Build Status Coverage Status devDependency Status

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.

Package Sidebar

Install

npm i chai-rage

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • arjanfrans