{"bin":{"whiskey":"./bin/whiskey"},"dist":{"shasum":"1428766926bcb940334034b34b78faa5290ec7af","tarball":"https://registry.npmjs.org/whiskey/-/whiskey-0.6.9.tgz","integrity":"sha512-r7lIFT60C9f47yTR4PlLJLq8rA/Jq4O3TtdplJ3yfUkyiYTAlSiOoH4Rz+QS/fRfc+f1IvIbJqEe/rSNMQQIIw==","signatures":[{"sig":"MEQCIEQ+cP0/f9pFAtqHahvd8RdDKsCojr6qUZWuQ5HxizKTAiBliwoYZAb3EZ4+7yMXEaShBln6K8QOefv72VqGM3yQnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index","name":"whiskey","author":{"name":"Cloudkick, Inc.","email":"tomaz+npm@cloudkick.com"},"readme":"Whiskey\n=======\n\nWhiskey is a powerful test runner for NodeJS applications.\n\nFeatures\n========\n\n* Each test file runs isolated in a separate process\n* Support for running multiple tests in parallel (`--concurrency` option)\n* Support for a test initialization function which is run before running the tests in a test file\n* Support for a test file timeout\n* setUp / tearDown function support\n* Support for different test reporters (cli, tap)\n* Support for code coverage (cli reporter, html reporter)\n* Support for reporting variables which have leaked into a global scope\n* Nicely formatted reports (colors!)\n* Integration with node debugger\n* Support for generating Makefiles with different Whiskey targets\n\nNon NPM-installable Dependencies\n===============================\n\n* [node-jscoverage](https://github.com/Kami/node-jscoverage) (only required if `--coverage` option is used)\n\nChanges\n=======\n\nFor changes please see [CHANGES.md](/cloudkick/whiskey/blob/master/CHANGES.md) file.\n\nInstallation\n============\n\nInstall it using npm:\n\n```\nnpm install whiskey\n```\n\nUsage\n=====\n\n    whiskey [options] --tests \"<test files>\"\n\n#### Available options\n\n * **-t, --tests** - Whitespace separated list of test files to run\n * **-ti, --test-init-file** - A path to the initialization file which must export\n `init` function and it is called in a child process *before running the tests in\n each test file\n * **-c, --chdir** - An optional path to which the child process will chdir to before\n running the tests\n * **--timeout [NUMBER]** - How long to wait for tests to complete before timing\n out\n * **--failfast** - Stop running the tests on a first failure or a timeout\n * **--no-styles** - Don't use styles and colors\n * **--concurrency [NUMBER]** - Maximum number of tests which will run in parallel (defaults to 1)\n * **--quiet** - Don't print stdout and stderr\n * **--real-time** - Print stdout and stderr as soon as it comes in\n * **--test-reporter [cli,tap]** - Which test reporter to use (defaults to cli)\n * **--coverage** - Use this option to enable the test coverage\n * **--coverage-reporter [cli,html]** - Which coverage reporter to use (defaults to cli)\n * **--coverage-dir** - Directory where the coverage HTML report is saved\n * **--scope-leaks** - Record which variables were leaked into a global scope\n * **--scope-leaks-reporter [cli]** - Which scope leak reporter to use (defaults\n   to cli)\n * **--debug** - Attach a Node debugger to the test process\n * **--report-timing** - Report each test run time\n * **--dependencies STRING** - Specify path to the dependencies file for the\n   process runner. More information about the process runner can be found at\n   [PROCESS_RUNNER.md](/cloudkick/whiskey/blob/master/PROCESS_RUNNER.md)\n * **--only-essential-dependencies** - Only start dependencies required by the tests\n   files which are ran. This option is only applicable if `--dependencies` option\n   is used.\n\nNote: When specifying multiple test a list with the test paths must be quoted,\nfor example: `whiskey --tests \"tests/a.js tests/b.js tests/c.js\"`\n\nTest File Examples\n==================\n\nA simple example (success):\n\n``` javascript\nvar called = 0;\n\nexports['test_async_one_equals_one'] = function(test, assert) {\n  setTimeout(function() {\n    assert.equal(1, 1);\n    called++;\n    test.finish();\n  }, 1000);\n}\n\nexports['tearDown'] = function(test, assert) {\n  assert.equal(called, 1);\n  test.finish();\n}\n```\n\nA simple example (skipping a test):\n\n``` javascript\nvar dbUp = false;\nexports['test_query'] = function(test, assert) {\n  if (!dbUp) {\n    test.skip('Database is not up, skipping...');\n    return;\n  }\n\n  assert.equal(2, 1);\n  test.finish();\n}\n```\n\n\nA simple example (failure):\n\n``` javascript\nexports['test_two_equals_one'] = function(test, assert) {\n  assert.equal(2, 1);\n  test.finish();\n}\n```\n\nFor more examples please check the `example/` folder.\n\nRunning Whiskey test suite\n==========================\n\nTo run the Whiskey test suite, run the following command in the repository root\ndirectory.\n\n`npm test`\n\nIf all the tests have sucessfully passed, the process should exit with a zero\nstatus code and you should see `* * * Whiskey test suite PASSED. * * *`\nmessage.\n\nContributing\n============\n\nTo contribute, fork the repository, create a branch with your changes and open a\npull request.\n\nDebugging\n=========\n\nIf you want to debug your test, you can use the `--debug` option. This will\ncause Whiskey to start the test process with the V8 debugger attached to it\nand put you into the Node debugger prompt.\n\nWhiskey will also by default set a breakpoint at the beginning of your test\nfile.\n\nNote: This option can only be used with a single test file.\n\nTroubleshooting\n===============\n\n### I use `long-stack-straces` module in my own code and all of the tests get reported as succeeded\n\nLong stack traces modules intercepts the default Error object and throws a custom\none. The problem with this is that Whiskey internally relies on attaching the\ntest name to the `Error` object so it can figure out to which test the exception\nbelongs. long-stack-traces throws a custom Error object and as a consequence test\nname attribute gets lost so Whiskey thinks your test didn't throw any exceptions.\n\nThe solution for this problem is to disable `long-stack-trace` module when running\nthe tests. This shouldn't be a big deal, because Whiskey internally already uses\n`long-stack-traces` module which means that you will still get long stack traces\nin the exceptions which were thrown in your tests.\n\n### My test gets reported as \"timeout\" instead of \"failure\"\n\nIf your test gets reported as \"timeout\" instead of \"failure\" your test code most\nlikely looks similar to the one below:\n\n```javascript\nexports[\"test failure\"] = function(test, assert){\n  setTimeout(function() {\n    throw \"blaaaaah\";\n    test.finish();\n  },200);\n};\n```\n\nThe problem with this is that if you run tests in parallel (`--concurrency` > 1)\nand you don't use a custom assert object which gets passed to each test function,\nWhiskey can't figure out to which test the exception belongs. As a consequence,\nthe test is reported as \"timed out\" and the exception is reported as \"uncaught\".\n\nThe solution for this problem is to run the tests in sequential mode (drop the\n--concurrency option).\n\nLicense\n=======\n\nApache 2.0, for more info see [LICENSE](/cloudkick/whiskey/blob/master/LICENSE).\n","engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"_npmUser":{"name":"kami","email":"tomaz+npm@tomaz.me"},"homepage":"https://github.com/cloudkick/whiskey","keywords":["whiskey","tests","test runner","testing","tdd","coverage","test coverage"],"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache"}],"repository":{"url":"git://github.com/cloudkick/whiskey.git","type":"git"},"_npmVersion":"1.1.16","description":"A simple test runner for NodeJS applications.","directories":{"bin":"./bin","lib":"./lib","example":"./example"},"maintainers":[{"name":"kami","email":"tomaz@tomaz.me"}],"_nodeVersion":"v0.6.15","dependencies":{"gex":"= 0.0.1","async":">= 0.1.18","rimraf":"= 1.0.1","sprintf":">= 0.1.1","logmagic":"= 0.1.4","terminal":"= 0.1.3","simplesets":"= 1.1.6","magic-templates":"= 0.1.1"},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{},"_id":"whiskey@0.6.9","version":"0.6.9"}