{"name":"co-mocha","version":"1.1.3","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 --harmony -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.git#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 <4"},"gitHead":"74b770e0ddc8f648e300cac7a63d8f3cf707240d","_id":"co-mocha@1.1.3","_shasum":"49bb9c85bcd17e3250f8b84b875dc76668bc41dc","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"49bb9c85bcd17e3250f8b84b875dc76668bc41dc","tarball":"http://registry-npm.ywwl.com/co-mocha/download/co-mocha-1.1.3.tgz","integrity":"sha512-nxvy73G2JzDDtHBeTZUw4yYBsNSh5zKrbsE3K/lAGsFiEDDPr7aWEh6/mnYaeYiUq1Rof5WRu7mLd1V23BaV7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxHRIL/BILQLQLTobL45vYUsYQ78pbRQKEfSKlVr/I1gIgDTw2uiWzDwaCp4tAZqDqLVccR+hZNQzQeWP3T+Z+0/A="}],"size":5758,"noattachment":false,"key":"/co-mocha/-/co-mocha-1.1.3.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/co-mocha-1.1.3.tgz_1470092987358_0.21582962106913328"},"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":1470092987601,"_cnpm_publish_time":1470092987601,"dist-tags":{"latest":"1.2.2"}}