{"name":"jasmine-node","version":"2.0.0-beta2","description":"DOM-less simple JavaScript BDD testing framework for Node","contributors":[{"name":"Chris Moultrie","email":"chris@moultrie.org"}],"homepage":"https://github.com/mhevery/jasmine-node","repository":{"type":"git","url":"https://github.com/mhevery/jasmine-node.git"},"keywords":["testing","bdd"],"author":{"name":"Misko Hevery","email":"misko@hevery.com"},"maintainers":[{"name":"mhevery","email":"misko@hevery.com"},{"name":"tebriel","email":"chris@moultrie.org"}],"licenses":["MIT"],"dependencies":{"coffee-script":"~1.7.1","walkdir":"~0.0.7","underscore":"~1.6.0","gaze":"~0.5.1","mkdirp":"~0.3.5","minimist":"0.0.8","jasmine-growl-reporter":"~0.2.0"},"devDependencies":{"grunt-contrib-coffee":"^0.10.1","grunt-contrib-watch":"^0.5.3","grunt":"^0.4.2"},"bin":{"jasmine-node":"./bin/jasmine-node"},"preferGlobal":true,"main":"./lib/jasmine-node","scripts":{"test":"node lib/jasmine-node/cli.js spec"},"bugs":{"url":"https://github.com/mhevery/jasmine-node/issues"},"license":"ISC","engines":{"node":">=0.10.0"},"_id":"jasmine-node@2.0.0-beta2","dist":{"shasum":"48eab8dc3d0a6898108dbf92131cea8ebc111037","tarball":"http://registry-npm.ywwl.com/jasmine-node/download/jasmine-node-2.0.0-beta2.tgz","integrity":"sha512-X9ZM6e00ul3+dCFLkS4P7vrAyT/SgQxRTaNvLMqLc2Y/cXnX1ulJ9gTCi6nsfl1mF0uoA4mTBhO1Yehri8yxXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD60gBpTCVwXxahj+J13mL/8cyag6m0E5ygjAWdh6z46QIgQT97bAAcjQj4XgcP8zbgogmmaQSQMRYk/QuFF+5BnMw="}],"size":133815,"noattachment":false,"key":"/jasmine-node/-/jasmine-node-2.0.0-beta2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"tebriel","email":"tebriel@gmail.com"},"directories":{},"deprecated":"jasmine-node 1.x & 2.x are deprecated, with known vulnerability in jasmine-growl-reporter pre-2.0.0","readme":"jasmine-node\n======\n\n[![LICENSE](https://img.shields.io/github/license/mhevery/jasmine-node.svg?style=flat-square)](./LICENSE)\n[![npm](https://img.shields.io/npm/v/jasmine-node.svg?style=flat-square)](https://www.npmjs.com/package/jasmine-node)\n[![contributors](https://img.shields.io/badge/contributors-many-purple.svg?style=flat-square)](https://github.com/mhevery/jasmine-node/graphs/contributors)\n\nThis node.js module makes the wonderful [Pivotal Lab's jasmine](http://github.com/pivotal/jasmine)\nspec framework (version 1) available in node.js.\n\n\nProject status\n--------------\n\nThis project is now in maintenance mode. It is recommended to use the `jasmine` or `jasmine-npm`\npackage whenever possible.\n\n\njasmine\n-------\n\nVersion `1.3.1` of Jasmine is currently included with node-jasmine. This is a forked version from the\n[Karma project](https://github.com/karma-runner/karma-jasmine), which allows you to use the\n`ddescribe` and `iit` functions to run individual suites or specs.\n\nNOTICE: BETA `2.0.0` Support in the `Jasmine2.0` branch (with rewrite in CoffeeScript) is now abandoned and no longer supported.\n\nSupported Node.js versions\n--------------------------\n\n* Current:\n  - 10\n  - 12\n* Deprecated:\n  - 8 (EOL in December 2019)\n  - 6 (already past EOL)\n  - 4 (already past EOL)\n\nOlder versions of Node.js are no longer supported. It is *highly* recommended to upgrade to a supported version of Node.js.\n\nwhat's new\n----------\n*  Growl notifications with the `--growl` flag (requires Growl to be installed)\n*  Ability to test specs written in Literate CoffeeScript\n*  Teamcity Reporter reinstated.\n*  Ability to specify multiple files to test via list in command line\n*  Ability to suppress stack trace with `--noStack`\n*  Async tests now run in the expected context instead of the global one\n*  `--config` flag that allows you to assign variables to process.env\n*  Terminal Reporters are now available in the Jasmine Object #184\n*  Done is now available in all timeout specs #199\n*  `afterEach` is available in requirejs #179\n*  Editors that replace instead of changing files should work with autotest #198\n*  Jasmine Mock Clock now works!\n*  Autotest now works!\n*  Using the latest Jasmine!\n*  Verbose mode tabs `describe` blocks much more accurately!\n*  `--coffee` now allows specs written in Literate CoffeeScript (`.litcoffee`)\n\ninstall\n------\n\nTo install the latest official version, use NPM:\n\n```sh\nnpm install jasmine-node -g\n```\n\nTo install the latest _bleeding edge_ version, clone this repository and check\nout the `beta` branch.\n\nusage\n------\n\nWrite the specifications for your code in `*.js` and `*.coffee` files in the `spec/` directory.\nYou can use sub-directories to better organise your specs. In the specs use `describe()`, `it()` etc. exactly\nas you would in client-side jasmine specs.\n\n**Note**: your specification files must be named as `*spec.js`, `*spec.coffee` or `*spec.litcoffee`,\nwhich matches the regular expression `/spec\\.(js|coffee|litcoffee)$/i`;\notherwise jasmine-node won't find them!\nFor example, `sampleSpecs.js` is wrong, `sampleSpec.js` is right.\n\nIf you have installed the npm package, you can run it with:\n\n```sh\njasmine-node spec/\n```\n\nIf you aren't using npm, you should add `pwd`/lib to the `$NODE_PATH`\nenvironment variable, then run:\n\n```sh\nnode lib/jasmine-node/cli.js\n```\n\n\nYou can supply the following arguments:\n\n  * `--autotest`, provides automatic execution of specs after each change\n  * `--watch`, when used with `--autotest`, paths after `--watch` will be\nwatched for changes, allowing to watch for changes outside of specs directory\n  * `--coffee`, allow execution of `.coffee` and `.litcoffee` specs\n  * `--color`, indicates spec output should uses color to\nindicates passing (green) or failing (red) specs\n  * `--noColor`, do not use color in the output\n  * `-m, --match REGEXP`, match only specs containing \"REGEXPspec\"\n  * `--matchall`, relax requirement of \"spec\" in spec file names\n  * `--verbose`, verbose output as the specs are run\n  * `--junitreport`, export tests results as junitreport xml format\n  * `--output FOLDER`, defines the output folder for junitreport files\n  * `--teamcity`, converts all console output to teamcity custom test runner commands. (Normally auto detected.)\n  * `--growl`, display test run summary in a growl notification (in addition to other outputs)\n  * `--runWithRequireJs`, loads all specs using requirejs instead of node's native require method\n  * `--requireJsSetup`, file run before specs to include and configure RequireJS\n  * `--test-dir`, the absolute root directory path where tests are located\n  * `--nohelpers`, does not load helpers\n  * `--forceexit`, force exit once tests complete\n  * `--captureExceptions`, listen to global exceptions, report them and exit (interferes with Domains in NodeJs, so do not use if using Domains as well\n  * `--config NAME VALUE`, set a global variable in `process.env`\n  * `--noStack`, suppress the stack trace generated from a test failure\n\nIndividual files to test can be added as bare arguments to the end of the args.\n\nExample:\n\n```bash\njasmine-node --coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpec.js\n```\n\nasync tests\n-----------\n\njasmine-node includes an alternate syntax for writing asynchronous tests. Accepting\na done callback in the specification will trigger jasmine-node to run the test\nasynchronously waiting until the `done()` callback is called.\n\n```javascript\nvar request = require('request');\n\nit(\"should respond with hello world\", function(done) {\n  request(\"http://localhost:3000/hello\", function(error, response, body){\n    expect(body).toEqual(\"hello world\");\n    done();\n  });\n});\n```\n\nAn asynchronous test will fail after `5000` ms if `done()` is not called. This timeout\ncan be changed by setting `jasmine.getEnv().defaultTimeoutInterval` or by passing a timeout\ninterval in the specification.\n\n```javascript\nvar request = require('request');\n\nit(\"should respond with hello world\", function(done) {\n  request(\"http://localhost:3000/hello\", function(error, response, body){\n    done();\n  });\n}, 250); // timeout after 250 ms\n```\n\nor\n\n```javascript\nvar request = require('request');\n\njasmine.getEnv().defaultTimeoutInterval = 500;\n\nit(\"should respond with hello world\", function(done) {\n  request(\"http://localhost:3000/hello\", function(error, response, body){\n    done();\n  });  // timeout after 500 ms\n});\n```\n\nCheckout [`spec/SampleSpecs.js`](https://github.com/mhevery/jasmine-node/blob/master/spec/SampleSpecs.js) to see how to use it.\n\n\nrequirejs\n---------\n\nThere is a sample project in `/spec-requirejs`. It is comprised of:\n\n1.  `requirejs-setup.js`, this pulls in our wrapper template (next)\n1.  `requirejs-wrapper-template`, this builds up requirejs settings\n1.  `requirejs.sut.js`, this is a __SU__bject To __T__est, something required by requirejs\n1.  `requirejs.spec.js`, the actual jasmine spec for testing\n\nTo run it:\n\n```sh\nnode lib/jasmine-node/cli.js --runWithRequireJs --requireJsSetup ./spec-requirejs/requirejs-setup.js ./spec-requirejs/\n```\n\nexceptions\n----------\n\nOften you'll want to capture an uncaught exception and log it to the console,\nthis is accomplished by using the `--captureExceptions` flag. Exceptions will\nbe reported to the console, but jasmine-node will attempt to recover and\ncontinue. It was decided to not change the current functionality until `2.0`. So,\nuntil then, jasmine-node will still return `0` and continue on without this flag.\n\n### Scenario ###\n\nYou require a module, but it doesn't exist, ie `require('Q')` instead of\n`require('q')`. Jasmine-Node reports the error to the console, but carries on\nand returns `0`. This messes up Travis-CI because you need it to return a\nnon-zero status while doing CI tests.\n\n### Mitigation ###\n\nBefore `--captureExceptions`\n\n```sh\n> jasmine-node --coffee spec\n> echo $status\n0\n```\n\nRun jasmine node with the `--captureExceptions` flag.\n\n```sh\n> jasmine-node --coffee --captureExceptions spec\n> echo $status\n1\n```\n\n\ngrowl notifications\n-------------------\n\nJasmine node can display [Growl](http://growl.info) notifications of test\nrun summaries in addition to other reports.\nGrowl must be installed separately, see [node-growl](https://github.com/visionmedia/node-growl)\nfor platform-specific instructions. Pass the `--growl` flag to enable the notifications.\n\n\ndevelopment\n-----------\n\nInstall the dependent packages by running:\n\n```sh\nnpm install\n```\n\nRun the specs before you send your pull request:\n\n```sh\nspecs.sh\n```\n\n__Note:__ Some tests are designed to fail in the specs.sh. After each of the\nindividual runs completes, there is a line that lists what the expected\nPass/Assert/Fail count should be. If you add/remove/edit tests, please be sure\nto update this with your PR.\n\n\nchangelog\n---------\n\n* `1.16.2` Back to `jasmine-growl-reporter@~0.2.0` (needed by Node.js pre-4.0)\n* `1.16.1` Use `~` instead of `^` in `dependencies` (may be needed by some really old npm versions)\n* `1.16.0` Fix `dependencies` to prevent major package updates\n* `1.15.0` Switch to coffeescript package\n* `1.14.6` Update dependencies to resolve `npm audit` issues\n* `1.14.5` Using `~` instead of `^` for reporter version (thanks to [Maxim-Filimonov](https://github.com/Maxim-Filimonov))\n* `1.14.4` Rolled back jasmine reporter version (thanks to [tjmcduffie](https://github.com/tjmcduffie))\n* `1.14.3` Added 'onComplete' callback to TeamCityReporter (thanks to [JoergFiedler](https://github.com/JoergFiedler))\n* `1.14.2` Uhhh...not sure what happened here.\n* `1.14.1` Default to noColors if not in a TTY\n* `1.14.0` Add support for `iit`, `ddescribe` (thanks to [mgcrea](https://github.com/mgcrea))\n* `1.13.1` Add coffee-script support for 1.7.x (thanks to [nathancarter](https://github.com/nathancarter))\n* `1.13.0` Added timing to the verbose reporter (thanks to [rick-kilgore](https://github.com/rick-kilgore))\n* `1.12.1` Fixed an issue where an undefined variable caused an unhelpful\n   exception in --watch Resolves #278\n* `1.12.0`\n  *  Changed `util.print` to `stdout.write` (thanks to [nrstott](https://github.com/nrstott))\n  *  Don’t affect line numbers with --requireJsSetup (thanks to [daviddaurelio](https://github.com/davidaurelio))\n  *  Catch errors when loading helpers (thanks to [pimterry](https://github.com/pimterry))\n  *  Keep autotesting until all tests have passed (thanks to [notclive](https://github.com/notclive))\n* `1.11.0` Added Growl notification option `--growl` (thanks to\n   [AlphaHydrae](https://github.com/AlphaHydrae))\n* `1.10.2` Restored stack filter which was accidentally removed (thanks to\n   [kevinsawicki](https://github.com/kevinsawicki))\n* `1.10.1` `beforeEach` and `afterEach` now properly handle the async-timeout function\n* `1.10.0` Skipped tests now show in the terminal reporter's output (thanks\n   to [kevinsawicki](https://github.com/kevinsawicki))\n* `1.9.1` Timeout now consistent between Async and Non-Async Calls (thanks to\n   [codemnky](https://github.com/codemnky))\n* `1.9.0` Now re-throwing the file-not-found error, added info to README.md,\n   printing version with `--version`\n* `1.8.1` Fixed silent failure due to invalid REGEX (thanks to\n   [pimterry](https://github.com/pimterry))\n* `1.8.0` Fixed bug in autotest with multiple paths and added `--watch` feature\n    (thanks to [davegb3](https://github.com/davegb3))\n* `1.7.1` Removed unneeded fs dependency (thanks to\n   [kevinsawicki](https://github.com/kevinsawicki)) Fixed broken fs call in\n   node `0.6` (thanks to [abe33](https://github.com/abe33))\n* `1.7.0` Literate CoffeeScript now testable (thanks to [magicmoose](https://github.com/magicmoose))\n* `1.6.0` Teamcity Reporter Reinstated (thanks to [bhcleek](https://github.com/bhcleek))\n* `1.5.1` Missing files and require exceptions will now report instead of failing silently\n* `1.5.0` Now takes multiple files for execution. (thanks to [abe33](https://github.com/abe33))\n* `1.4.0` Optional flag to suppress stack trace on test failure (thanks to [Lastalas](https://github.com/Lastalas))\n* `1.3.1` Fixed context for async tests (thanks to [omryn](https://github.com/omryn))\n* `1.3.0` Added `--config` flag for changeable testing environments\n* `1.2.3` Fixed #179, #184, #198, #199. Fixes autotest, afterEach in requirejs, terminal reporter is in jasmine object, done function missing in async tests\n* `1.2.2` Revert Exception Capturing to avoid Breaking Domain Tests\n* `1.2.1` Emergency fix for path reference missing\n* `1.2.0` Fixed #149, #152, #171, #181, #195. `--autotest` now works as expected, jasmine clock now responds to the fake ticking as requested, and removed the path.exists warning\n* `1.1.1` Fixed #173, #169 (Blocks were not indented in verbose properly, added more documentation to address #180\n* `1.1.0` Updated Jasmine to `1.3.1`, fixed fs missing, catching uncaught exceptions, other fixes\n","publish_time":1394394607057,"_cnpm_publish_time":1394394607057,"dist-tags":{"2.0.0-beta1":"2.0.0-beta1","2.0.0-beta3":"2.0.0-beta4","beta":"2.0.0","edge":"2.0.1","latest":"3.0.0"}}