{"name":"grunt-jasmine-node-coverage","description":"Grunt task for running jasmine using istanbul for code coverage reports. Based off of grunt-jasmine-node by Omar Gonzalez (s9tpepper).","version":"2.0.1","homepage":"https://github.com/jribble/grunt-jasmine-node-coverage","author":{"name":"Jarrod Ribble","email":"jarrod.ribble@gmail.com"},"contributors":[{"name":"Juga Paazmaya","email":"paazmaya@yahoo.com","url":"https://paazmaya.fi"}],"repository":{"type":"git","url":"git://github.com/jribble/grunt-jasmine-node-coverage.git"},"bugs":{"url":"https://github.com/jribble/grunt-jasmine-node-coverage/issues"},"license":"MIT","main":"tasks/jasmine-node-task.js","engines":{"node":">=4.2.0"},"scripts":{"test":"grunt test","lint":"grunt eslint"},"files":["tasks","LICENSE-MIT","package.json","README.md"],"dependencies":{"deepmerge":"^1.5.1","istanbul":"^0.4.5","jasmine":"2.5.2","jasmine-reporters":"^2.2.1","jasmine-spec-reporter":"^3.3.0"},"devDependencies":{"grunt":"^1.0.1","grunt-eslint":"^20.1.0"},"peerDependencies":{"grunt":">=0.4.5"},"keywords":["gruntplugin","grunt","plugins","builds","ci","jasmine","istanbul","coverage"],"gitHead":"e5cb24747baf9345d48eec6cf19a374a0c92ec07","_id":"grunt-jasmine-node-coverage@2.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"paazmaya","email":"olavic@gmail.com"},"dist":{"integrity":"sha512-jvGYy/OomUSHdXW9Iw6EtwMADMcHPsQK/AXGVoMofxwkjIapcOaQ4j02W9n/ukNBRb4dAST6oZdgL+HJd1n1TQ==","shasum":"08753e7e2da5af10a05250f3c904ced02f3a5c71","tarball":"http://registry-npm.ywwl.com/grunt-jasmine-node-coverage/download/grunt-jasmine-node-coverage-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6nL9UiiRE7LeOahC4tK6B2hCuGj8endHtkW0G0WwQWwIgVYU29VYC1yxDNtBoXUKMHBsI8bNfY+B7/1lYOz3ci5I="}],"size":8266,"noattachment":false,"key":"/grunt-jasmine-node-coverage/-/grunt-jasmine-node-coverage-2.0.1.tgz"},"maintainers":[{"name":"jribble","email":"jarrod.ribble@gmail.com"},{"name":"paazmaya","email":"olavic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grunt-jasmine-node-coverage-2.0.1.tgz_1505906028608_0.5856653752271086"},"directories":{},"readme":"# grunt-jasmine-node-coverage\n\n> Runs jasmine with Istanbul code coverage\n\n[![Dependency Status](https://david-dm.org/jribble/grunt-jasmine-node-coverage.svg)](https://david-dm.org/jribble/grunt-jasmine-node-coverage)\n[![devDependency Status](https://david-dm.org/jribble/grunt-jasmine-node-coverage/dev-status.svg)](https://david-dm.org/jribble/grunt-jasmine-node-coverage#info=devDependencies)\n[![Build Status](https://travis-ci.org/jribble/grunt-jasmine-node-coverage.svg)](https://travis-ci.org/jribble/grunt-jasmine-node-coverage)\n[![Built with Grunt](http://img.shields.io/badge/Grunt-1.0-blue.svg?style=flat-square)](http://gruntjs.com/)\n[![Analytics](https://ga-beacon.appspot.com/UA-2643697-15/grunt-jasmine-node-coverage/index?flat)](https://github.com/igrigorik/ga-beacon)\n\nA [Grunt](http://gruntjs.com/) task to run your [Jasmine](http://jasmine.github.io/)\nfeature suite using [jasmine-npm](https://github.com/jasmine/jasmine-npm)\nand [Istanbul](https://github.com/gotwarlost/istanbul) for code coverage reports.\n\nThe minimum supported Node.js version is `4.2.0` (LTS), and while works also in `0.10.x`, no quarantees are given.\n\n## Getting Started\n\nInstall this grunt plugin next to your project's `Gruntfile.js` with:\n\n```sh\nnpm install grunt-jasmine-node-coverage --save-dev\n```\n\nThen add these lines to your project's `Gruntfile.js` configuration file:\n\n```javascript\ngrunt.initConfig({\n  jasmine_node: {\n    task_name: {\n      options: {\n        forceExit: true,\n        coverage: {\n          includeAllSources: true\n        },\n        jasmine: {\n          spec_dir: 'tests',\n          spec_files: [\n            '**/*spec.js'\n          ]\n        }\n      },\n      src: ['src/**/*.js']\n    }\n  }\n});\n\ngrunt.loadNpmTasks('grunt-jasmine-node-coverage');\n\ngrunt.registerTask('default', 'jasmine_node');\n```\n\n## Configuring tasks\n\nGrunt tasks should be configured by following\n[the multi task configuration](http://gruntjs.com/creating-tasks#multi-tasks)\nform, thus wrapping each configuration in an object inside the `jasmine_node` root object.\n\n### Task configuration options\n\n#### options.jasmine\n\nType: `object`\n\nDefault: see below\n\nJasmine specific configuration. Use empty object,\n`{}` to use the defaults that are shown below.\n\n```js\n{\n  spec_dir: 'spec',\n  spec_files: ['**/*[sS]pec/.js'],\n  helpers: [],\n  reporters: {\n    spec: {}\n  }\n}\n```\n\nSee the [jasmine docs](http://jasmine.github.io/2.4/node.html#section-Configuration) for more information on the supported configuration.\n\nThe `reporters` property allows the following properties:\n\n* `spec`: used to configure the [Jasmine spec reporter](https://github.com/bcaudan/jasmine-spec-reporter).\n* `teamcity` set it to `true` in order to use [Jasmine Reporters - TeamCityReporter](https://github.com/larrymyers/jasmine-reporters).\n* `junitXml` set it to a object to use [Jasmine Reporters - JUnitXmlReporter](https://github.com/larrymyers/jasmine-reporters).  See the jasmine-reporters\ndocumentation for additional configuration options.\n\nIf `teamcity` reporter is set `spec` reporter will be disabled and `teamcity` reporter will be added to the coverage reporters as well.\n\nExample of using `teamcity` reporter:\n\n```js\n{\n  spec_dir: 'spec',\n  spec_files: ['**/*[sS]pec/.js'],\n  helpers: [],\n  reporters: {\n    teamcity: true\n  }\n}\n```\n\nExample of using `junitXml` reporter:\n\n```js\n{\n  spec_dir: 'spec',\n  spec_files: ['**/*[sS]pec/.js'],\n  helpers: [],\n  reporters: {\n    junitXml: {\n      savePath: \"reports\",\n      consolidateAll: true\n    }\n  }\n}\n```\n\n#### options.coverage\n\nType: `object`\n\nDefault: see below\n\nIstanbul specific configuration. Use empty object,\n`{}` to use the defaults that are shown below.\n\n```js\n{\n  reportFile: 'coverage.json',\n  relativize: true,\n  thresholds: {\n    statements: 0,\n    branches: 0,\n    lines: 0,\n    functions: 0\n  },\n  watermarks: {\n    statements: [50, 80],\n    lines: [50, 80],\n    functions: [50, 80],\n    branches: [50, 80],\n  },\n  includeAllSources: false,\n  reportDir: 'coverage',\n  report: [\n    'lcov',\n    'text-summary'\n  ],\n  collect: [ // false to disable, paths are relative to 'reportDir'\n    '*coverage.json'\n  ],\n  excludes: []\n}\n```\n\nNotes:\n\n* The `excludes` list will automatically include `'**/node_modules/**'` internally.\n* Setting the `thresholds` values greater than `0` will cause the task to fail if the specified threshold is not met.\n* The `watermarks` config changes the thresholds at which the reports are displayed in red, yellow and green. It does not affect the outcome of the task.\n* Setting the `report` list will allow different types of istanbul report to be set.\n\n\n#### options.projectRoot\n\nType: `string`\n\nDefault: `process.cwd()`\n\nSee http://nodejs.org/api/process.html#process_process_cwd\n\n\n#### options.forceExit\n\nType: `boolean`\n\nDefault: `false`\n\nExit on failure by skipping any asynchronous tasks pending.\n\n\n#### options.captureExceptions\n\nType: `boolean`\n\nDefault: `false`\n\nIf set to `true`, will log all uncaught exceptions.\n\n\n#### options.isVerbose\n\nType: `boolean`\n\nDefault: `false`\n\nWhen `true`, istanbul will print more information when running.\n\n\n## Bugs\n\nHelp us to squash them by submitting an issue that describes how you encountered it;\nplease be as specific as possible including operating system, `node`, `grunt`, and\n`grunt-jasmine-node-coverage` versions.\n\n```sh\nnpm --versions\n```\n\n## Migration notes\n\n### v1.x -> v2.x\n\nThe `spec` reporter configuration has changed for v2 of this plugin. The following is an example of the change in configuration that is needed. This is not an exhaustive list: refer to the [jasmine-spec-reporter](https://github.com/bcaudan/jasmine-spec-reporter) for a full reference of the configuration options.\n\n```js\n// v1\nreporters: {\n  spec: {\n    colors: true,\n    displayStacktrace: 'summary',\n    displaySuccessfulSpec: true\n  }\n}\n\n// v2\nreporters: {\n  spec: {\n    colors: {\n      enabled: true\n    },\n    summary: {\n      displayStacktrace: true\n    },\n    spec: {\n      displaySuccessful: true\n    }\n  }\n}\n```\n\n\n### v0.x -> v1.x\n\nIf you are updating to `v1.x`, you'll need to update your Gruntfile.\n\nThe following example outlines the changes needed. It assumes the following folder structure:\n\n```\napp/\n├── src/\n│   ├── abacus.js\n│   └── calculator.js\n└── test/\n    ├── helpers.js\n    └── specs/\n        ├── abacus.spec.js\n        └── calculator.spec.js\n```\n\n```js\n// v0.5.0 config\n{\n  jasmine_node: {\n    task_name: {\n      options: {\n        match: '.',\n        matchAll: true,\n        specFolders: ['test'],\n        extensions: 'js',\n        specNameMatcher: 'spec',\n        useHelpers: true\n      }\n    }\n  }\n}\n\n// v1.0.0 config\n{\n  jasmine_node: {\n    task_name: {\n      options: {\n        jasmine: {\n          spec_dir: 'test',\n          spec_files: [\n            'specs/*.spec.js'\n          ],\n          helpers: [\n            'helpers.js'\n          ]\n        }\n      }\n    }\n  }\n}\n```\n\nPlease note that the junit reporter is no longer available. If you are using this reporter and wish to update to v1, please open a new issue and we'll see if we can get it added back in. Even better, submit a PR :smile:\n\n## Release History\n\n* `v2.0.1` (2017-09-20)\n  - Looks like the compatibility between different dependencies requires to use `jasmine` of version `2.5.2`, which is not the latest (`2.5.3`)\n* `v2.0.0` (2017-09-20)\n  - **Breaking changes alert! Ensure you read the migration guide before updating from previous versions**\n  - Updated to jasmine-spec-reporter `v3.3.0`. Older style configuration needs to be updated, see migration guide for more details.\n  - Removed support for Node.js `v0.10`\n* `v1.2.0` (2017-04-30)\n  - Was compatible with Grunt `0.4` all the time, hence lowering the dependency requirement #60\n* `v1.1.1` (2016-08-29)\n  - Istanbul `v0.4.5` and using `data.src` instead of `fileSrc` for compatibility #59\n* `v1.1.0` (2016-08-23)\n  - Add Node.js `v0.10.0` support back by using `var` instead of `const` and `let`, #55\n  - Teamcity reporter for Jasmine, #56\n* `v1.0.0` (2016-07-23)\n  - **Breaking changes alert! Ensure you read the migration guide before updating from previous versions**\n  - Minimum supported Node.js version is `4.2.0` (LTS), removed testing against `0.10`\n  - Migrated from `jasmine-node` to `jasmine-npm` #35 #48\n  - Support `includeAllSources` istanbul coverage option #45 #50\n  - Support thresholds for passing/failing build #25\n  - Removed junit reporter\n* `v0.5.0` (2016-05-03)\n  - Grunt.js version 1.0 support\n  - ESLint configuration migration to 2.0\n  - Remove bin path #29\n  - Update license property for todays requirements\n  - Do not always make `lcov` output\n* `v0.4.1` (2015-02-27)\n  - Reports should be collected from where they were written #42\n* `v0.4.0` (2015-02-19)\n  - Other Grunt tasks were not ran when this failed, #40\n* `v0.3.2` (2015-02-04)\n  - Fixes for failure cases and documentation, #33, #36, #37 and #38\n* `v0.3.1` (2014-11-21)\n  - Installation failed\n  - Should fix #30\n* `v0.3.0` (2014-11-09)\n  - Grunt usage as multi task\n  - Fixes #12 and #18\n* `v0.2.0` (2014-11-03)\n  - Better Grunt API usage\n  - Fixes #10, #13, #14, #16, #19 and #20\n* `v0.1.11` (2014-05-15)\n  -  Task name fix for `grunt.renametask` use case\n* `v0.1.10` (2014-04-07)\n  -  JSHint configuration and task exit fixes\n* `v0.1.9` (2014-04-02)\n  - Configuration for `jasmine_node.options.isVerbose` was not working\n* `v0.1.8` (2014-03-03)\n  - Add captureExceptions support and quit on exception\n* `v0.1.7` (2013-12-13)\n  - Istanbul update, threshold configuration and JUNit output\n* `v0.1.6` (2013-07-26)\n  - Change `isVerbose` option to `verbose`\n* `v0.1.5` (2013-07-15)\n  - Initial coverage with Istanbul release, originally forked from `grunt-jasmine-node`\n\n## License\n\nCopyright (c) 2013 \"jribble\" Jarrod Ribble & contributors.\nBased on [grunt-jasmine-node](https://github.com/jasmine-contrib/grunt-jasmine-node).\n\nCopyright (c) 2012 \"s9tpepper\" Omar Gonzalez & contributors.\nLicensed under the MIT license.\n\n[jasmine-node]: https://github.com/mhevery/jasmine-node \"Integration of Jasmine Spec framework with Node.js\"\n","publish_time":1505906029704,"_cnpm_publish_time":1505906029704,"dist-tags":{"latest":"2.0.1"}}