{"name":"test-runner","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.6.0-0","description":"Minimal, extensible test runner.","repository":{"type":"git","url":"git+https://github.com/75lb/test-runner.git"},"license":"MIT","bin":{"test-runner":"bin/cli.js"},"keywords":["test","runner","minimal","simple","easy","tape","tap","ava","mocha"],"engines":{"node":">=4"},"scripts":{"test":"node test.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"dependencies":{"@keystone/emitter":"^0.2.11","ansi-escape-sequences":"^4.0.0","array-back":"^2.0.0","command-line-args":"^5.0.2","command-line-usage":"^4.1.0","file-set":"^1.1.1","reduce-flatten":"^1.0.1"},"devDependencies":{"jsdoc-to-markdown":"^4.0.1"},"standard":{"ignore":["es5","tmp"]},"readme":"[![view on npm](https://img.shields.io/npm/v/test-runner.svg)](https://www.npmjs.org/package/test-runner)\n[![npm module downloads](https://img.shields.io/npm/dt/test-runner.svg)](https://www.npmjs.org/package/test-runner)\n[![Build Status](https://travis-ci.org/75lb/test-runner.svg?branch=master)](https://travis-ci.org/75lb/test-runner)\n[![Dependency Status](https://david-dm.org/75lb/test-runner.svg)](https://david-dm.org/75lb/test-runner)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# test-runner\n\nA minimal test runner built around a single, core principle: if a test function completes successfully (or fulfils), it passes. If it throws (or rejects) it fails. It has no opinion how you write tests, or which (if any) assertion library you use.\n\n```js\nconst TestRunner = require('test-runner')\nconst runner = new TestRunner()\n```\n\n## Synopsis\n\nPassing test, sync.\n\n```js\nrunner.test('this will pass', function () {\n  const thought = 'Nothing failing here.'\n})\n```\n\nPassing test, async.\n\n```js\nrunner.test('this will also pass', function () {\n  return Promise.resolve('Nothing failing here.')\n})\n```\n\nFailing test, sync.\n\n```js\nrunner.test('this will fail', function () {\n  throw new Error('Definitely something wrong here.')\n})\n```\n\nFailing test, async.\n\n```js\nrunner.test('this will also fail', function () {\n  return Promise.reject('Definitely something wrong here.')\n})\n```\n\nTo run the tests, execute the script:\n\n```\n$ node test.js\n```\n\n... or use the command-line tool to test multiple files:\n\n```\n$ test-runner test/*.js\n```\n\n<a name=\"module_test-runner\"></a>\n\n## test-runner\n\n* [test-runner](#module_test-runner)\n    * [TestRunner](#exp_module_test-runner--TestRunner) ⇐ <code>EventEmitter</code> ⏏\n        * [new TestRunner([options])](#new_module_test-runner--TestRunner_new)\n        * _instance_\n            * [.start()](#module_test-runner--TestRunner+start) ⇒ <code>Promise</code>\n            * [.test(name, testFunction)](#module_test-runner--TestRunner+test) ↩︎\n            * [.skip()](#module_test-runner--TestRunner+skip) ↩︎\n            * [.only(name, testFunction)](#module_test-runner--TestRunner+only) ↩︎\n        * _static_\n            * [.run(globs)](#module_test-runner--TestRunner.run) ⇒ <code>Array</code>\n\n<a name=\"exp_module_test-runner--TestRunner\"></a>\n\n### TestRunner ⇐ <code>EventEmitter</code> ⏏\nRegister tests and run them sequentially or in parallel. By default, testing begins automatically but can be set to start manually.\n\n**Kind**: Exported class  \n**Extends**: <code>EventEmitter</code>  \n<a name=\"new_module_test-runner--TestRunner_new\"></a>\n\n#### new TestRunner([options])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| [options] | <code>object</code> |  |\n| [options.log] | <code>function</code> | Specify a custom log function. Defaults to `console.log`. |\n| [options.manualStart] | <code>boolean</code> | If `true`, you must call `runner.start()` manually. |\n| [options.sequential] | <code>boolean</code> | Run async tests sequentially. |\n\n<a name=\"module_test-runner--TestRunner+start\"></a>\n\n#### testRunner.start() ⇒ <code>Promise</code>\nBegin testing. You'll only need to use this method when `manualStart` is `true`.\n\n**Kind**: instance method of [<code>TestRunner</code>](#exp_module_test-runner--TestRunner)  \n**Fulfil**: <code>Array</code> - Resolves with an array containing the return value of each test.  \n<a name=\"module_test-runner--TestRunner+test\"></a>\n\n#### testRunner.test(name, testFunction) ↩︎\nRegister a test.\n\n**Kind**: instance method of [<code>TestRunner</code>](#exp_module_test-runner--TestRunner)  \n**Chainable**  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | <code>string</code> | Each name supplied must be unique to the runner instance. |\n| testFunction | <code>function</code> | The test function. If it throws or rejects, the test will fail. |\n\n<a name=\"module_test-runner--TestRunner+skip\"></a>\n\n#### testRunner.skip() ↩︎\nNo-op. Use this method when you want a test to be skipped.\n\n**Kind**: instance method of [<code>TestRunner</code>](#exp_module_test-runner--TestRunner)  \n**Chainable**  \n<a name=\"module_test-runner--TestRunner+only\"></a>\n\n#### testRunner.only(name, testFunction) ↩︎\nOnly run this and other tests registered with `only`.\n\n**Kind**: instance method of [<code>TestRunner</code>](#exp_module_test-runner--TestRunner)  \n**Chainable**  \n\n| Param | Type |\n| --- | --- |\n| name | <code>string</code> | \n| testFunction | <code>function</code> | \n\n<a name=\"module_test-runner--TestRunner.run\"></a>\n\n#### TestRunner.run(globs) ⇒ <code>Array</code>\nRun one or more test files. The output will be an array containing the export value from each module.\n\n**Kind**: static method of [<code>TestRunner</code>](#exp_module_test-runner--TestRunner)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| globs | <code>Array.&lt;string&gt;</code> | One or more file paths or glob expressions. |\n\n\n* * *\n\n&copy; 2016-18 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","readmeFilename":"README.md","gitHead":"8769a34e0976c081226213f43ac40684f335fa80","bugs":{"url":"https://github.com/75lb/test-runner/issues"},"homepage":"https://github.com/75lb/test-runner#readme","_id":"test-runner@0.6.0-0","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"integrity":"sha512-CJI6uiKE7Cp1KR7Ri7EfOPhJiiHWzLC2YKpH+3BjJnuOr4tVuuiAQpF58ljQmEq3viDkAPwGwo5npjOLaNiIvg==","shasum":"03e522eb58179bc830b0d9dd274b5cbb54e7ed8a","tarball":"http://registry-npm.ywwl.com/test-runner/download/test-runner-0.6.0-0.tgz","fileCount":15,"unpackedSize":24556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRCUvCl95thCf4Di90bdlZwuxl1Ys8kS/mweUrg4mkEAiBoCP3X+SL4zKRcnaU98mec9+fDH3y5qnO5xoZVaYLKAg=="}],"size":6141,"noattachment":false,"key":"/test-runner/-/test-runner-0.6.0-0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/test-runner_0.6.0-0_1518814245427_0.29166277349389236"},"_hasShrinkwrap":false,"publish_time":1518814245484,"_cnpm_publish_time":1518814245484,"dist-tags":{"latest":"0.11.1","next":"0.12.0-10"}}