{"_id":"jest-sonar-reporter","_rev":"9-ff77e0f359f8078478bf0b03a5c64f02","name":"jest-sonar-reporter","description":"A Sonar test reporter for Jest.","dist-tags":{"latest":"2.0.0"},"versions":{"1.1.0":{"name":"jest-sonar-reporter","version":"1.1.0","description":"A Sonar test reporter for Jest.","main":"index.js","scripts":{"test":"env-cmd test jest","test:coverage":"env-cmd test jest --coverage","test:debug":"env-cmd debug jest"},"repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","engines":{"node":">=4.0.0"},"dependencies":{"xml":"^1.0.1"},"devDependencies":{"@types/jest":"^18.1.1","@types/node":"^7.0.5","env-cmd":"^4.0.0","jest":"^19.0.2"},"jest":{"testEnvironment":"node","testResultsProcessor":"<rootDir>/index.js"},"gitHead":"2428a0d68cec1cef3f57f826cc645e8855142ee0","_id":"jest-sonar-reporter@1.1.0","_shasum":"540d1929c3b387e1cf99944aea48393031b9826f","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"3dmind","email":"c.wlatschiha@gmail.com"},"dist":{"shasum":"540d1929c3b387e1cf99944aea48393031b9826f","tarball":"https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-1.1.0.tgz","integrity":"sha512-YVDdU+IGSBf/i8nQhxw+473a4iPQZ8904nlMxqA+svBcklRKRrLne7gahFuGahtd+SmXqQLX0jOB9Nk4KzWzOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmF7U4VcmrDRnfzvnBsfhP8cHYBIsMvRi3VzI3CjVypQIhAN0QY5KVB5XRuJr3+lwFQlFv/VEZWqhQwrY3FU3oTLAx"}]},"maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/jest-sonar-reporter-1.1.0.tgz_1489921930503_0.8244493948295712"},"directories":{}},"1.1.1":{"name":"jest-sonar-reporter","version":"1.1.1","description":"A Sonar test reporter for Jest.","main":"index.js","scripts":{"test":"env-cmd test jest","test:watch":"env-cmd test jest --watch","test:coverage":"env-cmd test jest --coverage","test:debug":"env-cmd debug jest"},"repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","engines":{"node":">=4.0.0"},"dependencies":{"xml":"^1.0.1"},"devDependencies":{"@types/jest":"^18.1.1","@types/node":"^7.0.5","env-cmd":"^4.0.0","jest":"^19.0.2"},"jest":{"testEnvironment":"node","testResultsProcessor":"<rootDir>/index.js"},"gitHead":"e91f1ced073c75f30fc10b8691894f2957e256e6","_id":"jest-sonar-reporter@1.1.1","_shasum":"16ac0e0a9e93c700c80c4f65f1ef4c74dd183172","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"3dmind","email":"c.wlatschiha@gmail.com"},"dist":{"shasum":"16ac0e0a9e93c700c80c4f65f1ef4c74dd183172","tarball":"https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-1.1.1.tgz","integrity":"sha512-4m0COhTR1ebiJyzY455a1oEOETa9ashpgD8toaw4w+XhQNPpqnG/6TkuCszQ0EsPtEQFQLeZBap9TU8App6KrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrDFls9Woi/odwrc50Qxn2TARD1ToH4uCzs8rQuXL/9AIgWOPEuaLKhtRYqt3odZ5fJrn92cQdBeWIKwmQ9AIJGlY="}]},"maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/jest-sonar-reporter-1.1.1.tgz_1492270211131_0.5358367948792875"},"directories":{}},"1.2.0":{"name":"jest-sonar-reporter","version":"1.2.0","description":"A Sonar test reporter for Jest.","main":"index.js","scripts":{"clean":"rimraf reports coverage","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:debug":"env-cmd debug jest","preversion":"npm run clean && npm run test","version":"./version.sh $npm_package_version && git add sonar-project.properties"},"repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","engines":{"node":">=4.0.0"},"dependencies":{"xml":"^1.0.1"},"devDependencies":{"@types/jest":"^18.1.1","@types/node":"^7.0.5","env-cmd":"^4.0.0","jest":"^20.0.4","rimraf":"^2.6.1"},"jest":{"testEnvironment":"node","testResultsProcessor":"<rootDir>/index.js"},"jestSonar":{"reportPath":"reports","reportFile":"test-report.xml","indent":4},"gitHead":"9fb3adeae0bc48e050edfecd82ddba363b70caf7","_id":"jest-sonar-reporter@1.2.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"3dmind","email":"c.wlatschiha@gmail.com"},"dist":{"integrity":"sha512-N1nokcXehqhy4cFBioaAO6l5W12OMv8ZC2u3ihIUBLEXWl+5Zqv68kcLDfLMlZEU+9X4Moq8CQ/Yn+JdCKaRRQ==","shasum":"6a846fe4aa2d3a406cd38e722bfa9fc383eb3314","tarball":"https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-1.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtGKdLfcLrj2D7kYOaO1KK5PFFCgatGCGwhEguQ3Bu6QIgfInJz+SxCihuo5Xhj7iHUAgCLMhpKPh5OwhxV5NZXqs="}]},"maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-sonar-reporter-1.2.0.tgz_1498946095635_0.1534350235015154"},"directories":{}},"1.3.0":{"name":"jest-sonar-reporter","version":"1.3.0","description":"A Sonar test reporter for Jest.","main":"index.js","scripts":{"clean":"rimraf reports coverage","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:debug":"env-cmd debug jest","preversion":"npm run clean && npm run test","version":"./version.sh $npm_package_version && git add sonar-project.properties"},"repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","engines":{"node":">=4.0.0"},"dependencies":{"xml":"^1.0.1"},"devDependencies":{"@types/jest":"^18.1.1","@types/node":"^7.0.5","env-cmd":"^4.0.0","jest":"^20.0.4","rimraf":"^2.6.1"},"jest":{"testEnvironment":"node","testResultsProcessor":"<rootDir>/index.js"},"jestSonar":{"reportPath":"reports","reportFile":"test-report.xml","indent":4},"gitHead":"a2b598881c8d9ce1011249572ee8fcba8a3c38f4","_id":"jest-sonar-reporter@1.3.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"3dmind","email":"c.wlatschiha@gmail.com"},"dist":{"integrity":"sha512-vuvBUYs/CXecI49xN3xQAuMq56Zcu3tXyNllCzsd+c7kuaruwdCt/7OTDMfilIdJxKPcQ29xKG8e6xBQrWAdVQ==","shasum":"dd05b57a40d19cc8c8b1e5598acf632dbaafbb85","tarball":"https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-1.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhI1XA4urK2Tyu7a11ZPntIb9KAW7iMSeNC/C0LInWjAiAwr9bqZR0iihv0H73lQ53fyTRF34u4Bd/d7PRScBkUww=="}]},"maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-sonar-reporter-1.3.0.tgz_1503782329011_0.40151697117835283"},"directories":{}},"2.0.0":{"name":"jest-sonar-reporter","version":"2.0.0","description":"A Sonar test reporter for Jest.","keywords":["sonar","sonarqube","jest","results","processor"],"main":"index.js","scripts":{"clean":"rimraf reports* coverage","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:debug":"DEBUG=true jest","preversion":"npm run clean && npm run test:coverage","version":"./version.sh $npm_package_version && git add sonar-project.properties"},"repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","engines":{"node":">=8.0.0"},"dependencies":{"xml":"^1.0.1"},"devDependencies":{"@types/jest":"^22.2.0","@types/node":"^9.4.7","jest":"^22.4.2","rimraf":"^2.6.2"},"jest":{"testEnvironment":"node","testResultsProcessor":"<rootDir>/index.js"},"jestSonar":{"reportPath":"reports","reportFile":"test-report.xml","indent":4},"gitHead":"50eb5da58de243f4c26123ad4272ce7e1dd90209","_id":"jest-sonar-reporter@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"3dmind","email":"c.wlatschiha@gmail.com"},"dist":{"integrity":"sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==","shasum":"faa54a7d2af7198767ee246a82b78c576789cf08","tarball":"https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz","fileCount":14,"unpackedSize":9391,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSUJrVCo63RzyT08JVJsIcNtYsWtuqckvfra+/ZrUEoAiBpKQaUdNQe6KNWnAMLY11vNeeKkP57jA1Sw3PQPOZw0A=="}]},"maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-sonar-reporter_2.0.0_1522014117460_0.6284363856620132"},"_hasShrinkwrap":false}},"readme":"# jest-sonar-reporter\n\n[![Build Status](https://travis-ci.org/3dmind/jest-sonar-reporter.svg?branch=master)](https://travis-ci.org/3dmind/jest-sonar-reporter)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jest-sonar-reporter&metric=alert_status)](https://sonarcloud.io/dashboard?id=jest-sonar-reporter)\n\njest-sonar-reporter is a custom results processor for Jest.\nThe processor converts Jest's output into Sonar's\n[generic test data](https://docs.sonarqube.org/display/SONAR/Generic+Test+Data) format.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ npm i -D jest-sonar-reporter\n```\n\nUsing yarn:\n\n```bash\n$ yarn add -D jest-sonar-reporter\n```\n\n## Configuration\n\nConfigure Jest in your `package.json` to use `jest-sonar-reporter` as a custom results processor.\n\n```json\n{\n  \"jest\": {\n    \"testResultsProcessor\": \"jest-sonar-reporter\"\n  }\n}\n```\n\nConfigure Sonar to import the test results. Add the `sonar.testExecutionReportPaths` property to your\n`sonar-project.properties` file.\n\n```properties\nsonar.testExecutionReportPaths=test-report.xml\n```\n\n## Customization\n\nTo customize the reporter you can use `package.json` to store the configuration.\n\nCreate a `jestSonar` entry like this:\n\n```json\n{\n  \"jestSonar\": {}\n}\n```\n\nYou can customize the following options:\n- `reportPath` This will specify the path to put the report in.\n- `reportFile` This will specify the file name of the report.\n- `indent` This will specify the indentation to format the report.\n\n```json\n{\n  \"jestSonar\": {\n    \"reportPath\": \"reports\",\n    \"reportFile\": \"test-reporter.xml\",\n    \"indent\": 4\n  }\n}\n```\n\n> Important: Don't forget to update `sonar.testExecutionReportPaths` when you use a custom path and file name.\n\n### Support for Sonarqube 5.6.x\n\nSonarqube 5.6.x does not support [Generic Test Data](https://docs.sonarqube.org/display/SONAR/Generic+Test+Data) however it has a [Generic Test Coverage plugin](https://docs.sonarqube.org/display/PLUG/Generic+Test+Coverage) which offers similar functionality.\n\nIf you have the plugin installed on Sonarqube, you can configure this reporter to produce files in supported format.\n\n```json\n{\n  \"jestSonar\": {\n    \"sonar56x\": true\n  }\n}\n```\n\nConfigure Sonar to import the test results. Add the `sonar.genericcoverage.unitTestReportPaths` property to your\n`sonar-project.properties` file.\n\n```properties\nsonar.genericcoverage.unitTestReportPaths=test-report.xml\n```\n\n### Support for different configuration environments\n\nTo support different environments add the `env` property to the configuration and overwrite the value of the option you want to modify for the specific environment.\nYou can overwrite the following configuration options: `reportPath`, `reportFile`, `indent`, `sonar56x`\n\nFor example: Overwrite the path were the report will be stored.\n```json\n{\n  \"jestSonar\": {\n    \"reportPath\": \"reports\",\n    \"reportFile\": \"test-reporter.xml\",\n    \"indent\": 4,\n    \"env\": {\n      \"test\": {\n        \"reportPath\": \"reports-test\"\n      }\n    }\n  }\n}\n``` \n\nUse the `NODE_ENV` variable to activate the environment specific configuration.\n```shell\nNODE_ENV=test npm run test\n``` \n\n## Usage\n\n1. Run Jest to execute your tests.\n\nUsing npm:\n\n```bash\n$ npm run test\n```\n\nUsing yarn:\n\n```bash\n$ yarn run test\n```\n\n2. Run sonar-scanner to import the test results.\n\n```bash\n$ sonar-scanner\n```\n\n## Licence\n\nThis project uses the [MIT](LICENSE) licence.\n","maintainers":[{"name":"3dmind","email":"c.wlatschiha@gmail.com"}],"time":{"modified":"2022-06-19T04:14:09.466Z","created":"2017-03-19T11:12:11.132Z","1.1.0":"2017-03-19T11:12:11.132Z","1.1.1":"2017-04-15T15:30:11.761Z","1.2.0":"2017-07-01T21:54:56.558Z","1.3.0":"2017-08-26T21:18:50.064Z","2.0.0":"2018-03-25T21:41:58.097Z"},"homepage":"https://github.com/3dmind/jest-sonar-reporter#readme","repository":{"type":"git","url":"git+https://github.com/3dmind/jest-sonar-reporter.git"},"author":{"name":"Christian Wlatschiha","email":"c.wlatschiha@gmail.com"},"bugs":{"url":"https://github.com/3dmind/jest-sonar-reporter/issues"},"license":"MIT","readmeFilename":"README.md","users":{"dickeylth":true},"keywords":["sonar","sonarqube","jest","results","processor"]}