{"name":"co-mocha","version":"1.1.1","description":"Enable support for generators in Mocha tests","main":"lib/co-mocha.js","files":["co-mocha.js","lib/","LICENSE"],"browser":{"path":false},"scripts":{"lint":"standard","build":"browserify lib/co-mocha.js -s co-mocha -o co-mocha.js","test-spec":"mocha -R spec --require lib/co-mocha.js --bail","test-cov":"testem ci -l Firefox,Node","test":"npm run lint && npm run build && npm run test-cov"},"repository":{"type":"git","url":"git://github.com/blakeembrey/co-mocha.git"},"keywords":["co","mocha","harmony","generators"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/co-mocha/issues"},"homepage":"https://github.com/blakeembrey/co-mocha","devDependencies":{"browserify":"^10.2.4","chai":"^3.0.0","es6-promise":"^2.3.0","istanbul":"git://github.com/gotwarlost/istanbul#harmony","mocha":"^2.2.5","pre-commit":"^1.0.7","regenerator":"^0.8.26","standard":"^3.11.1","testem":"^0.8.3","traceur":"0.0.89"},"standard":{"ignore":["coverage/**","node_modules/**","bower_components/**","co-mocha.js"]},"dependencies":{"co":"^4.0.0","is-generator":"^1.0.1"},"peerDependencies":{"mocha":">=1.18 <3"},"gitHead":"5fe3bdb1bbba21efa624431ab1a7e5d6019347d7","_id":"co-mocha@1.1.1","_shasum":"ca1af9541cfe670af81fb00ed2fbb1ed0603dc0f","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"dist":{"shasum":"ca1af9541cfe670af81fb00ed2fbb1ed0603dc0f","tarball":"http://registry-npm.ywwl.com/co-mocha/download/co-mocha-1.1.1.tgz","integrity":"sha512-iZA2MQVWSZ5HCzAlrJ8W4kEXSIBMR9gb2rrCWP7aZArnQHyyM27OeweuJgSMDJa6rvpl/KYBAZbTyX2TBmSkzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFx1D+sBc7Yxl/RvasIFQPUYzOHs1/HvjkAlSopUSKJfAiAK7e6Lvm6oLxav/1JLhmcucGPthz3xnvX45qMJwTnT7A=="}],"size":4767,"noattachment":false,"key":"/co-mocha/-/co-mocha-1.1.1.tgz"},"directories":{},"readme":"# Co Mocha\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Greenkeeper badge](https://badges.greenkeeper.io/blakeembrey/co-mocha.svg)](https://greenkeeper.io/)\n\nEnable support for generators in Mocha tests using [co](https://github.com/visionmedia/co).\n\nUse the `--harmony-generators` flag when running node 0.11.x to access generator functions, or transpile your tests using [traceur](https://github.com/google/traceur-compiler) or [regenerator](https://github.com/facebook/regenerator).\n\n## Installation\n\n```\nnpm install co-mocha --save-dev\n```\n\n## Usage\n\nJust require the module in your tests and start writing generators in your tests.\n\n```js\nit('should do something', function * () {\n  yield users.load(123)\n})\n```\n\n### Node\n\nInstall the module using `npm install co-mocha --save-dev`. Now just require the module to automatically monkey patch any available `mocha` instances. With `mocha`, you have multiple ways of requiring the module - add `--require co-mocha` to your `mocha.opts` or add `require('co-mocha')` inside your main test file.\n\nIf you need to monkey patch a different mocha instance you can use the library directly:\n\n```js\nvar mocha = require('mocha')\nvar coMocha = require('co-mocha')\n\ncoMocha(mocha)\n```\n\n### `<script>` Tag\n\n```html\n<script src=\"co-mocha.js\"></script>\n```\n\nIncluding the browserified script will automatically patch `window.Mocha`. Just make sure you include it after `mocha.js`. If that is not possible the library exposes `window.coMocha`, which can be used (`window.coMocha(window.Mocha)`).\n\n### AMD\n\nSame details as the script, but using AMD requires instead.\n\n## How It Works\n\nThe module monkey patches the `Runnable.prototype.run` method of `mocha` to enable generators. In contrast to other npm packages, `co-mocha` extends `mocha` at runtime - allowing you to use any compatible mocha version.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/co-mocha.svg?style=flat\n[npm-url]: https://npmjs.org/package/co-mocha\n[downloads-image]: https://img.shields.io/npm/dm/co-mocha.svg?style=flat\n[downloads-url]: https://npmjs.org/package/co-mocha\n[travis-image]: https://img.shields.io/travis/blakeembrey/co-mocha.svg?style=flat\n[travis-url]: https://travis-ci.org/blakeembrey/co-mocha\n[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/co-mocha.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/blakeembrey/co-mocha?branch=master\n","publish_time":1434445672490,"_cnpm_publish_time":1434445672490,"dist-tags":{"latest":"1.2.2"}}