{"author":{"name":"Larry Myers"},"name":"jasmine-reporters","description":"Reporters for the Jasmine BDD Framework","version":"1.0.0","homepage":"https://github.com/larrymyers/jasmine-reporters","maintainers":[{"name":"bloveridge","email":"bloveridge@gmail.com"}],"repository":{"type":"git","url":"git://github.com/larrymyers/jasmine-reporters.git"},"main":"./src/load_reporters.js","dependencies":{},"devDependencies":{},"licenses":[{"type":"MIT","url":"https://raw.github.com/larrymyers/jasmine-reporters/master/LICENSE"}],"gitHead":"7179172dff49b29bb1c6372de7427cdc69f71343","bugs":{"url":"https://github.com/larrymyers/jasmine-reporters/issues"},"_id":"jasmine-reporters@1.0.0","scripts":{},"_shasum":"ce751331bb5fdef8570995d997f2cca3d91ed6b3","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"bloveridge","email":"bloveridge@gmail.com"},"dist":{"shasum":"ce751331bb5fdef8570995d997f2cca3d91ed6b3","tarball":"http://registry-npm.ywwl.com/jasmine-reporters/download/jasmine-reporters-1.0.0.tgz","integrity":"sha512-IB1JN5Pmu4lhwlFYljqY2E5xU+UJUIWu43D3ItFLgNxhQJTUlWgM3HT6Q70CX/H2aLYLnFJ3n0v4g2MWqh6hZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICaDv5SWW1FKoBs6/rPXg0GzfRlZ7fzMl+la7Zv0sBQ1AiAr5MwlMBmBElcGYUeINgpNTYs6LOwyK60sGjKqhtDImA=="}],"size":1067511,"noattachment":false,"key":"/jasmine-reporters/-/jasmine-reporters-1.0.0.tgz"},"directories":{},"readme":"[![Build Status](https://travis-ci.org/larrymyers/jasmine-reporters.svg?branch=master)](https://travis-ci.org/larrymyers/jasmine-reporters)\n\nThis branch is for Jasmine 2.x.\n[Switch to the 1.x branch.](https://github.com/larrymyers/jasmine-reporters/tree/jasmine1.x)\n\n# Jasmine Reporters\n\nJasmine Reporters is a collection of javascript jasmine reporter classes that can be used with\nthe [JasmineBDD testing framework](http://jasmine.github.io/).\n\nIncluded reporters:\n\n* AppVeyor - POSTs results to AppVeyor when running inside an AppVeyor environment.\n* JUnitXmlReporter - Report test results to a file in JUnit XML Report format.\n* NUnitXmlReporter - Report test results to a file in NUnit XML Report format.\n* TapReporter - Test Anything Protocol, report tests results to console.\n* TeamCityReporter - Basic reporter that outputs spec results to for the Teamcity build system.\n* TerminalReporter - Logs to a terminal (including colors) with variable verbosity.\n\n### PhantomJS\n\nShould work with all modern versions of Phantom JS, and has been tested with PhantomJS\n1.4.6 through 1.9.6 on Mac OS X. If you find issues with a particular version, please\nconsider creating a pull request.\n\n### Node.js\n\nThe reporters also work in Node.js, and most can be used in combination with\n[jasmine-node](https://github.com/mhevery/jasmine-node). Make sure to use the correct\ncombination of jasmine-reporters and jasmine-node, as both projects have different versions\n/ branches for Jasmine1.x vs Jasmine2.x support.\n\n# Basic Usage\n\nWhen used for in-browser tests, the reporters are registered on a `jasmineReporters` object in the\nglobal scope (i.e. `window.jasmineReporters`).\n\n```javascript\nvar junitReporter = new jasmineReporters.JUnitXmlReporter({\n    savePath: '..',\n    consolidateAll: false\n});\njasmine.getEnv().addReporter(junitReporter);\n```\n\n### PhantomJS\n\nIn order to write files to the local filesystem for in-browser tests, the reporters will attempt\nto use PhantomJS to create the files. A special method `__phantom_writeFile` is injected by the\nincluded `phantomjs.runner.sh` script.\n\nIt is strongly recommended to use the provided script to run your test suite using PhantomJS. If\nyou want to use your own PhantomJS runner, you will need to inject a `__phantom_writeFile`\nmethod, and also take care to correctly determine when all results have been reported.\n\nYou can use the included PhantomJS test runner to run any of the included examples.\n**NOTE:** you will need to install the Jasmine dependency via `bower` if you want to use the\nincluded PhantomJS runner for any of the included examples--this is where the examples\nlook for the Jasmine core library.\n\n```bash\n# install jasmine via bower\nbower install\n\n# run any of the examples\nbin/phantomjs.runner.sh examples/tap_reporter.html\nbin/phantomjs.runner.sh examples/junit_xml_reporter.html\n```\n\n### NodeJS\n\nIn Node.js, jasmine-reporters exports an object with all the reporters which you can use\nhowever you like.\n\n```javascript\nvar reporters = require('jasmine-reporters');\nvar junitReporter = new reporters.JUnitXmlReporter({\n    savePath: __dirname,\n    consolidateAll: false\n});\njasmine.getEnv().addReporter(junitReporter)\n```\n\n### More examples\n\nAn example for each reporter is available in the `examples` directory.\n\n# Changes in jasmine-reporters@2.0\n\njasmine-reporters is built for Jasmine 2.x. If you are still using Jasmine 1.x, please use\nthe correct tag / branch / npm version:\n\n* bower: `bower install jasmine-reporters#^1.0.0`\n* Node.js: `npm install jasmine-reporters@^1.0.0`\n* git submodule: `git submodule add -b jasmine1.x git@github.com:larrymyers/jasmine-reporters.git jasmine-reporters`\n* or use any of the `1.*` tags\n\n## Migrating from jasmine-reporters@1.0\n\n* reporters are no longer registered on the global `jasmine` object\n    * 1.x: `new jasmine.JUnitXmlReporter( /* ... */ );`\n    * 2.x: `new jasmineReporters.JUnitXmlReporter( /* ... */ );`\n* configurable reporters no longer use positional arguments\n    * 1.x: `new jasmine.JUnitXmlReporter('testresults', true, true, 'junit-', true);`\n    * 2.x: `new jasmineReporters.JUnitXmlReporter({savePath:'testresults', filePrefix: 'junit-', consolidateAll:true});`\n\n# Protractor\n\nAs of Protractor 1.6.0, protractor supports Jasmine 2 by specifying\n`framework: \"jasmine2\"` in your protractor.conf file.\n\nFirst, install a Jasmine 2.x-compatible of jasmine-reporters:\n\n```bash\nnpm install --save-dev jasmine-reporters@^2.0.0\n```\n\nThen set everything up inside your protractor.conf:\n\n```javascript\nframework: 'jasmine2',\nonPrepare: function() {\n    var jasmineReporters = require('jasmine-reporters');\n    jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({\n        consolidateAll: true,\n        savePath: 'testresults',\n        filePrefix: 'xmloutput'\n    }));\n}\n```\n\n### Multi Capabilities\n\nIf you run a `multiCapabilities` setup you can reflect this in your test results\nby using the option `modifySuiteName`. This enables you to have distinct suite\nnames per capability.\n\n```javascript\nmultiCapabilities: [\n    {browserName: 'firefox'},\n    {browserName: 'chrome'}\n],\nframework: 'jasmine2',\nonPrepare: function() {\n    var jasmineReporters = require('jasmine-reporters');\n\n    // returning the promise makes protractor wait for the reporter config before executing tests\n    return browser.getProcessedConfig().then(function(config) {\n        // you could use other properties here if you want, such as platform and version\n        var browserName = config.capabilities.browserName;\n\n        var junitReporter = new jasmineReporters.JUnitXmlReporter({\n            consolidateAll: true,\n            savePath: 'testresults',\n            // this will produce distinct xml files for each capability\n            filePrefix: browserName + '-xmloutput',\n            modifySuiteName: function(generatedSuiteName, suite) {\n                // this will produce distinct suite names for each capability,\n                // e.g. 'firefox.login tests' and 'chrome.login tests'\n                return browserName + '.' + generatedSuiteName;\n            }\n        });\n        jasmine.getEnv().addReporter(junitReporter);\n    });\n}\n```\n\nYou can also use the `modifyReportFileName` option to generate distinct\nfilenames when `consolidateAll` is `false`.\n\n```javascript\nmultiCapabilities: [\n    {browserName: 'firefox'},\n    {browserName: 'chrome'}\n],\nframework: 'jasmine2',\nonPrepare: function() {\n    var jasmineReporters = require('jasmine-reporters');\n\n    // returning the promise makes protractor wait for the reporter config before executing tests\n    return browser.getProcessedConfig().then(function(config) {\n        // you could use other properties here if you want, such as platform and version\n        var browserName = config.capabilities.browserName;\n\n        var junitReporter = new jasmineReporters.JUnitXmlReporter({\n            consolidateAll: false,\n            savePath: 'testresults',\n            modifyReportFileName: function(generatedFileName, suite) {\n                // this will produce distinct file names for each capability,\n                // e.g. 'firefox.SuiteName' and 'chrome.SuiteName'\n                return browserName + '.' + generatedFileName;\n            }\n        });\n        jasmine.getEnv().addReporter(junitReporter);\n    });\n}\n```\n\n","publish_time":1404334772350,"_cnpm_publish_time":1404334772350,"dist-tags":{"latest":"2.5.2"}}