Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arjanfrans/chai-rage
:rage: Tests not working? Put some rage in your test code.
https://github.com/arjanfrans/chai-rage
Last synced: 12 days ago
JSON representation
:rage: Tests not working? Put some rage in your test code.
- Host: GitHub
- URL: https://github.com/arjanfrans/chai-rage
- Owner: arjanfrans
- License: mit
- Created: 2015-09-16T17:14:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-16T22:00:10.000Z (almost 9 years ago)
- Last Synced: 2024-10-11T09:09:05.711Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chai-rage
[![NPM](https://nodei.co/npm/chai-rage.png?compact=true)](https://www.npmjs.com/package/chai-rage)
[![Build Status](https://travis-ci.org/arjanfrans/chai-rage.svg)](https://travis-ci.org/arjanfrans/chai-rage)
[![Coverage Status](https://coveralls.io/repos/arjanfrans/chai-rage/badge.svg?branch=master&service=github)](https://coveralls.io/github/arjanfrans/chai-rage?branch=master)
[![devDependency Status](https://david-dm.org/arjanfrans/chai-rage/dev-status.svg)](https://david-dm.org/arjanfrans/chai-rage#info=devDependencies)A plugin for [Chai Assertion Library](http://chaijs.com/) 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
```Javascript
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](https://github.com/arjanfrans/chai-rage/tree/master/example).