{"id":16759314,"url":"https://github.com/no23reason/jest-trx-results-processor","last_synced_at":"2025-03-17T02:31:11.813Z","repository":{"id":38418842,"uuid":"70991885","full_name":"no23reason/jest-trx-results-processor","owner":"no23reason","description":"Jest results processor for exporting into TRX files for Visual Studio","archived":false,"fork":false,"pushed_at":"2024-04-15T04:54:32.000Z","size":1969,"stargazers_count":22,"open_issues_count":10,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T07:58:04.648Z","etag":null,"topics":["jest","jest-trx","testing","testing-tools","trx","typescript","visual-studio","vsts"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/no23reason.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-15T14:16:16.000Z","updated_at":"2024-02-05T01:35:33.000Z","dependencies_parsed_at":"2024-06-18T15:52:16.656Z","dependency_job_id":null,"html_url":"https://github.com/no23reason/jest-trx-results-processor","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no23reason%2Fjest-trx-results-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no23reason%2Fjest-trx-results-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no23reason%2Fjest-trx-results-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no23reason%2Fjest-trx-results-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/no23reason","download_url":"https://codeload.github.com/no23reason/jest-trx-results-processor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243837004,"owners_count":20355813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","jest-trx","testing","testing-tools","trx","typescript","visual-studio","vsts"],"created_at":"2024-10-13T04:07:50.826Z","updated_at":"2025-03-17T02:31:11.415Z","avatar_url":"https://github.com/no23reason.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Node.js CI](https://github.com/no23reason/jest-trx-results-processor/workflows/Node.js%20CI/badge.svg)\n[![npm version](https://img.shields.io/npm/v/jest-trx-results-processor.svg)](https://www.npmjs.com/package/jest-trx-results-processor)\n[![Dependency Status](https://david-dm.org/no23reason/jest-trx-results-processor.svg)](https://david-dm.org/no23reason/jest-trx-results-processor)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n# jest-trx-results-processor\n\nThis package is used to export a TRX file from [Jest](https://facebook.github.io/jest/) test runs to be used in [Visual Studio](https://www.visualstudio.com/) and [Visual Studio Team Services](https://www.visualstudio.com/vsts-test/).\n\n## Migration from 0.x\n\nVersion 1.0.0 was rewritten to use reporters API. Either use that (see [Usage](#usage)), or update the require path in your configuration (see [Usage as testResultsProcessor](#usage-as-testresultsprocessor)).\n\n## Installation\n\n```\nyarn add --dev jest-trx-results-processor\n```\n\n## Usage\n\nIn your jest config add the following entry:\n\n```json\n{\n  \"reporters\": [\"default\", \"jest-trx-results-processor\"]\n}\n```\n\nYou can also pass additional arguments:\n\n```json\n{\n  \"reporters\": [\n    \"default\",\n    [\n      \"jest-trx-results-processor\",\n      {\n        \"outputFile\": \"relative/path/to/resulting.trx\", // defaults to \"test-results.trx\"\n        \"defaultUserName\": \"user name to use if automatic detection fails\" // defaults to \"anonymous\"\n      }\n    ]\n  ]\n}\n```\n\nThen run jest as usual.\n\n## Usage as testResultsProcessor\n\n_Notice: this method of use will be removed in the next major version. Please use the reporters API described above._\n\nCreate a `jestTrxProcessor.js` file somewhere in your project (for this example I'll assume the `scripts` folder).\nThere you can configure the processor, as Jest does not allow you to pass custom parameters to the results processor:\n\n```js\n// for jest-trx-results-processor \u003e= 1.0.0\nvar builder = require(\"jest-trx-results-processor/dist/testResultsProcessor\"); // only this has changed since v 0.x\n// for jest-trx-results-processor \u003c 1.0.0\nvar builder = require(\"jest-trx-results-processor\");\n\nvar processor = builder({\n  outputFile: \"relative/path/to/resulting.trx\", // this defaults to \"test-results.trx\"\n  defaultUserName: \"user name to use if automatic detection fails\", // this defaults to \"anonymous\"\n});\n\nmodule.exports = processor;\n```\n\nFinally, point Jest to your results processor in the `package.json`:\n\n```json\n{\n  \"devDependencies\": {\n    \"jest\": \"^19.0.0\",\n    \"jest-trx-results-processor\": \"~0.0.5\"\n  },\n  \"jest\": {\n    \"testResultsProcessor\": \"./scripts/jestTrxProcessor\"\n  }\n}\n```\n\nThen you just run Jest as you normally would.\n\nMinimal working configuration can be seen in the [examples folder](https://github.com/no23reason/jest-trx-results-processor/tree/master/examples).\n\n## Acknowledgements\n\nThis tool is heavily inspired by [karma-trx-reporter](https://github.com/hatchteam/karma-trx-reporter) and [jest-junit](https://github.com/jest-community/jest-junit).\n\n## License\n\n_jest-trx-results-processor_ is available under MIT. See [LICENSE](https://github.com/no23reason/jest-trx-results-processor/tree/master/LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno23reason%2Fjest-trx-results-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fno23reason%2Fjest-trx-results-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno23reason%2Fjest-trx-results-processor/lists"}