{"_id":"thunk-mocha","_rev":"1212369","name":"thunk-mocha","description":"Enable support for generators in Mocha with backward compatibility.","dist-tags":{"latest":"1.0.8"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"time":{"modified":"2021-10-13T05:46:03.000Z","created":"2015-09-25T12:03:29.757Z","1.0.8":"2016-10-10T07:57:54.653Z","1.0.7":"2016-10-07T04:02:02.577Z","1.0.6":"2016-09-08T14:23:20.778Z","1.0.5":"2016-08-29T13:40:41.909Z","1.0.4":"2016-07-30T07:31:14.532Z","1.0.3":"2016-02-07T16:19:06.543Z","1.0.2":"2016-01-24T11:30:57.373Z","1.0.1":"2015-11-29T03:07:56.157Z","1.0.0":"2015-10-09T12:42:08.765Z","0.1.1":"2015-09-26T05:52:40.445Z","0.1.0":"2015-09-25T12:03:29.757Z"},"users":{"xueboren":true,"xinwangwang":true,"chenkan":true,"jsumners":true},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"versions":{"1.0.8":{"name":"thunk-mocha","version":"1.0.8","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">=1"},"dependencies":{"thunks":"^4.7.5"},"devDependencies":{"mocha":"^3.1.1","standard":"^8.3.0"},"peerDependencies":{"mocha":">=2 || >=3.0"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"5ddfd580eeb30b436c2fa6b837867e51da7f70b6","_id":"thunk-mocha@1.0.8","_shasum":"347ae5af07f1eb0ab04c3746355f453b82739a5d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"347ae5af07f1eb0ab04c3746355f453b82739a5d","size":2393,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.8.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.8.tgz_1476086272845_0.14777322323061526"},"directories":{},"publish_time":1476086274653,"_cnpm_publish_time":1476086274653,"_hasShrinkwrap":false},"1.0.7":{"name":"thunk-mocha","version":"1.0.7","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">=1"},"dependencies":{"thunks":"^4.7.5"},"devDependencies":{"mocha":"^3.1.0","standard":"^8.3.0"},"peerDependencies":{"mocha":">=2 || >=3.0"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"2c02e8a7fc3812aeff4a63a14627abb8192c259d","_id":"thunk-mocha@1.0.7","_shasum":"680e72950ff19dffa3b2551f384dff279c85047a","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"680e72950ff19dffa3b2551f384dff279c85047a","size":2394,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.7.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.7.tgz_1475812918945_0.05697123659774661"},"directories":{},"publish_time":1475812922577,"_cnpm_publish_time":1475812922577,"_hasShrinkwrap":false},"1.0.6":{"name":"thunk-mocha","version":"1.0.6","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1"},"dependencies":{"thunks":"^4.5.1"},"devDependencies":{"mocha":"^3.0.2","standard":"^8.0.0"},"peerDependencies":{"mocha":">=2 || >=3.0"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"48f22014f36dc8013ca3528065019a8d7d929134","_id":"thunk-mocha@1.0.6","_shasum":"f35712fd81dec0256c70d5859c4de3a9a3f3d416","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"f35712fd81dec0256c70d5859c4de3a9a3f3d416","size":2389,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.6.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.6.tgz_1473344600550_0.4930886556394398"},"directories":{},"publish_time":1473344600778,"_cnpm_publish_time":1473344600778,"_hasShrinkwrap":false},"1.0.5":{"name":"thunk-mocha","version":"1.0.5","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1"},"dependencies":{"thunks":"^4.5.1"},"devDependencies":{"mocha":"^3.0.2","standard":"^8.0.0"},"peerDependencies":{"mocha":">=2 || >=3.0"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"1637b8e7925cc1555e0dd84db535b6b19a63439b","_id":"thunk-mocha@1.0.5","_shasum":"9736de0e3732dd80faad07898982fcaff5441f6a","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"9736de0e3732dd80faad07898982fcaff5441f6a","size":2393,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.5.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.5.tgz_1472478039574_0.36366245592944324"},"directories":{},"publish_time":1472478041909,"_cnpm_publish_time":1472478041909,"_hasShrinkwrap":false},"1.0.4":{"name":"thunk-mocha","version":"1.0.4","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1"},"dependencies":{"thunks":"^4.3.0"},"devDependencies":{"mocha":"^2.5.3","standard":"^7.1.2"},"peerDependencies":{"mocha":">=2 || >=3.0.0-0"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"860675b22f5f4eaa4f41b4442b678ef011525360","_id":"thunk-mocha@1.0.4","_shasum":"508e30cc275a2b9fecf768bf94de93507bc0268a","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"508e30cc275a2b9fecf768bf94de93507bc0268a","size":2379,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.4.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.4.tgz_1469863870457_0.033312367741018534"},"directories":{},"publish_time":1469863874532,"_cnpm_publish_time":1469863874532,"_hasShrinkwrap":false},"1.0.3":{"name":"thunk-mocha","version":"1.0.3","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1"},"dependencies":{"thunks":"^4.1.2"},"devDependencies":{"mocha":"^2.3.4","standard":"^5.4.1"},"peerDependencies":{"mocha":"^2.3.x"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"11a175881657f29fb7c6ad4b7b0b543a0a3d9bbf","_id":"thunk-mocha@1.0.3","_shasum":"5b478e9991283b56fd98d133a7a57a0f09733573","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.6","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"5b478e9991283b56fd98d133a7a57a0f09733573","size":2312,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/thunk-mocha-1.0.3.tgz_1454861945603_0.0316598869394511"},"directories":{},"publish_time":1454861946543,"_cnpm_publish_time":1454861946543,"_hasShrinkwrap":false},"1.0.2":{"name":"thunk-mocha","version":"1.0.2","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1"},"dependencies":{"thunks":"^4.1.2"},"devDependencies":{"mocha":"^2.3.4","standard":"^5.4.1"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","files":["index.js","README.md"],"gitHead":"79dbce9dfffdbfaa702129545d5fc5d7cec7adcb","_id":"thunk-mocha@1.0.2","_shasum":"745ae87e04b550f8b40290c6818f172c5fb72532","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"745ae87e04b550f8b40290c6818f172c5fb72532","size":2267,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.2.tgz"},"directories":{},"publish_time":1453635057373,"_cnpm_publish_time":1453635057373,"_hasShrinkwrap":false},"1.0.1":{"name":"thunk-mocha","version":"1.0.1","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 1.x.x"},"dependencies":{"thunks":"^4.1.0"},"devDependencies":{"mocha":"^2.3.4","standard":"^5.4.1"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","ignore":["**/.*","node_modules","test","gulpfile.js"],"gitHead":"8a67295c90648fb6f55dbd7556ffc2be632ea4c6","_id":"thunk-mocha@1.0.1","_shasum":"bb932b7a1c445b990e0e6a431fea87a18a9cca16","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"bb932b7a1c445b990e0e6a431fea87a18a9cca16","size":2999,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.1.tgz"},"directories":{},"publish_time":1448766476157,"_cnpm_publish_time":1448766476157,"_hasShrinkwrap":false},"1.0.0":{"name":"thunk-mocha","version":"1.0.0","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 0.10.x"},"dependencies":{"thunks":"^3.5.1"},"devDependencies":{"mocha":"^2.3.3","standard":"^5.3.1"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","ignore":["**/.*","node_modules","test","gulpfile.js"],"gitHead":"207c36970a9463f17f2c49a5db1f139932af7f00","_id":"thunk-mocha@1.0.0","_shasum":"fb579a761c516260e696649d53937966817f4c28","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"fb579a761c516260e696649d53937966817f4c28","size":2968,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-1.0.0.tgz"},"directories":{},"publish_time":1444394528765,"_cnpm_publish_time":1444394528765,"_hasShrinkwrap":false},"0.1.1":{"name":"thunk-mocha","version":"0.1.1","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha -r ./index"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 0.10.x"},"dependencies":{"thunks":"^3.5.1"},"devDependencies":{"mocha":"^2.3.3","standard":"^5.3.1"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","ignore":["**/.*","node_modules","test","gulpfile.js"],"gitHead":"f5fe842f447c1c461ac525ef6fde0115f639e044","_id":"thunk-mocha@0.1.1","_shasum":"25ecc55c69032855c5148cd328c31b209a5f7043","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"25ecc55c69032855c5148cd328c31b209a5f7043","size":2957,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-0.1.1.tgz"},"directories":{},"publish_time":1443246760445,"_cnpm_publish_time":1443246760445,"_hasShrinkwrap":false},"0.1.0":{"name":"thunk-mocha","version":"0.1.0","description":"Enable support for generators in Mocha with backward compatibility.","main":"index.js","authors":["Yan Qing <admin@zensh.com>"],"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git://github.com/thunks/thunk-mocha.git"},"keywords":["mocha","thunk","generator"],"engines":{"node":">= 0.10.x"},"dependencies":{"thunks":"^3.5.1"},"devDependencies":{"mocha":"^2.3.3","standard":"^5.3.1"},"license":"MIT","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"homepage":"https://github.com/thunks/thunk-mocha","ignore":["**/.*","node_modules","test","gulpfile.js"],"gitHead":"ea85ac86319a1e7934b67df2b797bf6fc58f8978","_id":"thunk-mocha@0.1.0","_shasum":"2b7bf33a97ef4864da2adb4adf0e80ae6dfcf496","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"2b7bf33a97ef4864da2adb4adf0e80ae6dfcf496","size":2696,"noattachment":false,"key":"/thunk-mocha/-/thunk-mocha-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/thunk-mocha/download/thunk-mocha-0.1.0.tgz"},"directories":{},"publish_time":1443182609757,"_cnpm_publish_time":1443182609757,"_hasShrinkwrap":false}},"readme":"thunk-mocha\n==========\nEnable support for generators in Mocha with backward compatibility.\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads][downloads-image]][downloads-url]\n\nIt is similar to [Co Mocha](https://github.com/blakeembrey/co-mocha), but it is a different implementation and more powerful. It is a perfect patch for mocha!\n\n## Installation\n\n```\nnpm install thunk-mocha\n```\n\n## Usage\n\n**Call by mocha in CLI:**\n\n```sh\nmocha -r thunk-mocha\n```\n\n**Call in js file:**\n\n```js\n// make sure that `mocha` have loaded\nrequire('thunk-mocha')()\n// or: require('thunk-mocha')(require('mocha'))\n```\n\n\n## Example\n\n**After patched, mocha support:**\n```js\nit('support sync test', function () {\n  // do some test\n})\n\nit('support thunk style async test', function (done) {\n  // do some test\n  done()\n})\n\nit('support promise style async test', function () {\n  // do some test\n  return promiseLikeObject\n})\n\nit('support generator style async test', function * () {\n  // do some test\n  yield promise\n  // yield thunk\n  // yield generator\n  // ...\n})\n\nit('support async/await style async test', async function () {\n  // do some test\n  await promise\n})\n\nit('support Rx.Observable style async test', function () {\n  // do some test\n  return Rx.Observable.bindNodeCallback(fs.stat)('package.json')\n})\n```\n\n[npm-url]: https://npmjs.org/package/thunk-mocha\n[npm-image]: http://img.shields.io/npm/v/thunk-mocha.svg\n\n[travis-url]: https://travis-ci.org/thunks/thunk-mocha\n[travis-image]: http://img.shields.io/travis/thunks/thunk-mocha.svg\n\n[downloads-url]: https://npmjs.org/package/thunk-mocha\n[downloads-image]: http://img.shields.io/npm/dm/thunk-mocha.svg?style=flat-square\n","_attachments":{},"homepage":"https://github.com/thunks/thunk-mocha","bugs":{"url":"https://github.com/thunks/thunk-mocha/issues"},"license":"MIT"}