Few Mocha
Enable support for generators in Mocha tests using few.
Installation
npm install few-mocha --save-dev
Usage
Simply require the module and start writing generators in your tests.
;
Node
Install the module using npm install few-mocha --save-dev
. With mocha
, you have multiple ways of requiring the module:
- add
--require few-mocha
to yourmocha.opts
- add
require('few-mocha')
inside your main test file.
If you need to add generator support to a different mocha instance you can use it like this:
var mocha = var fewMocha =
How It Works
The module override the Runnable.prototype.run
method of mocha
to enable generators. In contrast to other npm packages, few-mocha
extends mocha
at runtime.
License
Licensed under Apache 2.0