# chocolate-factory

> Repeatedly run mocha test with varied parameters

Latest version **0.0.3** (published 2013-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install chocolate-factory
pnpm add chocolate-factory
yarn add chocolate-factory
bun add chocolate-factory
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2013-08-20 |
| First published | 2013-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | apechimp |
| Maintainers | apechimp |

## Links

- npm: https://www.npmjs.com/package/chocolate-factory
- Repository: https://github.com/apechimp/chocolate-factory
- Issues: https://github.com/apechimp/chocolate-factory/issues
- npm.io page: https://npm.io/package/chocolate-factory

## Dependencies (1)

- [underscore.string](https://npm.io/package/underscore.string.md) 2.3.3

## Recent versions

- 0.0.3 (latest) — 2013-08-20
- 0.0.2 — 2013-08-14
- 0.0.1 — 2013-08-14

## README

chocolate-factory
=================

Repeatedly run a mocha test with varying parameters.

Example
-------
```javascript
var testAll = require('chocolate-factory'),
    thingsToTest = [{
      description: 'should return bar with argument foo'
      argument: 'foo'
      returnValue: 'bar'
    }];

 testAll(thingsToTest).with(function(testDepiction) {
   baz(testDepiction.argument).should.eql(testDepiction.returnValue);
 });
```

Notes
-----

* test depictions must have a description parameter
* test functions must have testDepicition as their first parameter
* test functions with two parameters will have mocha's done put into the
  second parameter
* only the mocha bdd interface is supported

TODO
----
* Support something other than bdd interface

---
_Source: https://npm.io/package/chocolate-factory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
