{
  "name": "whiskey",
  "description": "A simple test runner for NodeJS applications.",
  "version": "0.6.13",
  "author": {
    "name": "Cloudkick, Inc.",
    "email": "tomaz+npm@cloudkick.com"
  },
  "keywords": [
    "whiskey",
    "tests",
    "test runner",
    "testing",
    "tdd",
    "coverage",
    "test coverage"
  ],
  "homepage": "https://github.com/cloudkick/whiskey",
  "repository": {
    "type": "git",
    "url": "git://github.com/cloudkick/whiskey.git"
  },
  "directories": {
    "lib": "./lib",
    "example": "./example",
    "bin": "./bin"
  },
  "scripts": {
    "test": "make test"
  },
  "dependencies": {
    "sprintf": ">= 0.1.1",
    "async": ">= 0.1.18",
    "magic-templates": "= 0.1.1",
    "rimraf": "= 1.0.1",
    "terminal": "= 0.1.3",
    "gex": "= 0.0.1",
    "simplesets": "= 1.1.6",
    "logmagic": "= 0.1.4",
    "underscore": ">= 1.4.2"
  },
  "engines": {
    "node": ">= 0.4.0"
  },
  "main": "./index",
  "bin": {
    "whiskey": "./bin/whiskey"
  },
  "licenses": [
    {
      "type": "Apache",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  ],
  "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 in a single suite (`--concurrency` option)\n* Support for running multiple suites in parallel (`--independent-tests` 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    whiskey [options] --independent-tests \"<test files>\"\n\n    whiskey [options] --tests \"<test files>\"  --independent-tests \"<test files>\"\n\n\n#### Available options\n\n * **-t, --tests** - Whitespace separated list of test suites to run sequentially\n * **-T, --independent-tests** - Whitespace separated list of test suites to run concurrently\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;\n\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\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\nA simple example using the optional BDD module:\n```javascript\nvar bdd = require('whiskey').bdd.init(exports);\nvar describe = bdd.describe;\n\ndescribe('the bdd module', function(it) {\n  it('supports it(), expect(), and toEqual()', function(expect) {\n    expect(true).toEqual(true);\n  });\n});\n```\n\nFor more examples please check the `example/` folder, and the `test/run.sh` script.\n\n# Build status\n\n[![Build Status](https://secure.travis-ci.org/cloudkick/whiskey.png)](http://travis-ci.org/cloudkick/whiskey)\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.  Further, you\ncannot use the `--debug` and `--independent-tests` options together.  The\nsemantics just don't make any sense.  To debug a test, make sure you invoke it\nwith `--tests` instead.\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",
  "readmeFilename": "README.md",
  "_id": "whiskey@0.6.13",
  "dist": {
    "shasum": "2f7c45f26a185eae713d9f801711cdc431a60373",
    "tarball": "http://registry.npmjs.org/whiskey/-/whiskey-0.6.13.tgz"
  },
  "_from": "whiskey@0.6.x",
  "_npmVersion": "1.2.11",
  "_npmUser": {
    "name": "kami",
    "email": "tomaz+npm@tomaz.me"
  },
  "maintainers": [
    {
      "name": "kami",
      "email": "tomaz@tomaz.me"
    }
  ],
  "_shasum": "2f7c45f26a185eae713d9f801711cdc431a60373",
  "_resolved": "https://registry.npmjs.org/whiskey/-/whiskey-0.6.13.tgz"
}
