{"id":16146538,"url":"https://github.com/voxpelli/node-test-pretty-reporter","last_synced_at":"2026-02-27T22:42:31.279Z","repository":{"id":183377680,"uuid":"670028700","full_name":"voxpelli/node-test-pretty-reporter","owner":"voxpelli","description":"Reporter for node:test that supports colorful diffs etc","archived":false,"fork":false,"pushed_at":"2026-01-15T04:39:53.000Z","size":170,"stargazers_count":19,"open_issues_count":18,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T11:38:43.778Z","etag":null,"topics":["chai","node-test","node-test-reporter","node-test-runner"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/voxpelli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["voxpelli"]}},"created_at":"2023-07-24T06:22:06.000Z","updated_at":"2025-08-05T06:02:41.000Z","dependencies_parsed_at":"2024-02-06T01:26:06.637Z","dependency_job_id":"826b28ec-30db-435e-86a8-85fdf6f1eff7","html_url":"https://github.com/voxpelli/node-test-pretty-reporter","commit_stats":null,"previous_names":["voxpelli/node-test-pretty-reporter"],"tags_count":7,"template":false,"template_full_name":"voxpelli/node-module-template","purl":"pkg:github/voxpelli/node-test-pretty-reporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Fnode-test-pretty-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Fnode-test-pretty-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Fnode-test-pretty-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Fnode-test-pretty-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpelli","download_url":"https://codeload.github.com/voxpelli/node-test-pretty-reporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Fnode-test-pretty-reporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29917939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chai","node-test","node-test-reporter","node-test-runner"],"created_at":"2024-10-10T00:20:27.257Z","updated_at":"2026-02-27T22:42:31.264Z","avatar_url":"https://github.com/voxpelli.png","language":"JavaScript","funding_links":["https://github.com/sponsors/voxpelli"],"categories":[],"sub_categories":[],"readme":"# @voxpelli/node-test-pretty-reporter\n\nReporter for [node:test](https://nodejs.org/api/test.html#custom-reporters) that supports colorful diffs etc\n\n[![npm version](https://img.shields.io/npm/v/@voxpelli/node-test-pretty-reporter.svg?style=flat)](https://www.npmjs.com/package/@voxpelli/node-test-pretty-reporter)\n[![npm downloads](https://img.shields.io/npm/dm/@voxpelli/node-test-pretty-reporter.svg?style=flat)](https://www.npmjs.com/package/@voxpelli/node-test-pretty-reporter)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-7fffff?style=flat\u0026labelColor=ff80ff)](https://github.com/neostandard/neostandard)\n[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)\n[![Types in JS](https://img.shields.io/badge/types_in_js-yes-brightgreen)](https://github.com/voxpelli/types-in-js)\n[![Follow @voxpelli@mastodon.social](https://img.shields.io/mastodon/follow/109247025527949675?domain=https%3A%2F%2Fmastodon.social\u0026style=social)](https://mastodon.social/@voxpelli)\n\n## Usage\n\n```sh\nnpm install -D @voxpelli/node-test-pretty-reporter\n```\n\n```sh\nnode --test --test-reporter=@voxpelli/node-test-pretty-reporter\n```\n\n## Why another test reporter?\n\nThis one is similar to the built-in `spec` reporter but differs in some ways which I personally prefer.\n\n### Rendering diffs from assertions\n\nOutputs colored diffs when a test is failed with an `Error` that has `expected` and `actual` properties (respecting a `showDiff` property set to `false`).\n\nDiff is generated by [`jest-diff`](https://www.npmjs.com/package/jest-diff) (no other part of `jest` is used in this reporter).\n\nAssertion libraries that outputs compatible errors:\n  * [`node:assert`](https://nodejs.org/api/assert.html#assert)\n  * [`chai`](https://www.chaijs.com/) (**note:** `chai.should()` breaks error presentation since `18.17.0`, see: [voxpelli/node-test-pretty-reporter#6](https://github.com/voxpelli/node-test-pretty-reporter/issues/6), [nodejs/node#48918](https://github.com/nodejs/node/issues/48918), [chaijs/chai#1530](https://github.com/chaijs/chai/issues/1530))\n\nAs with other changes, this makes the reporter on par [with Mocha](https://mochajs.org/#diffs).\n\n### Output styling\n\nThe output styling aligns more with Mocha's [`spec` reporter](https://mochajs.org/#spec):\n\n* ~~Errors are presented at the end instead of in the list of tests~~ _(also done in built in since [nodejs/node#47164](https://github.com/nodejs/node/pull/47164))_\n* Less visually intense, eg. no `▶` in front of names and only failed tests gets colored\n* Durations are only reported if considered slow (using same default [as Mocha](https://mochajs.org/#test-duration): 75ms)\n* No redundant mentioning of a test suite after the suite has completed – opts for a clean tree from top to bottom instead\n\n### Outputting the full `cause` chain of an `Error`\n\nWhen used with at least Node `18.17.0` or `20.2.0` this is supported (see [issue #2](https://github.com/voxpelli/node-test-pretty-reporter/issues/2)).\n\nSince those same versions the cause chain is also printed in the built in `spec` reporter, but done through `util.inspect()` there rather than the custom output here.\n\n### Example output\n\n![CLI output](docs/cli-output.png)\n\n## Similar modules\n\nI have not tested any of these myself yet so can't say if they work well or not, but adding here for reference.\n\n* [`MoLow/reporters`](https://github.com/MoLow/reporters) – many custom reporters for `node:test`\n* [`nearform/node-test-github-reporter`](https://github.com/nearform/node-test-github-reporter) – another custom report for `node:test`, this one from [@nearform](https://github.com/nearform) and geared towards GitHub Actions\n\n## See also\n\n* [`node:test`](https://nodejs.org/api/test.html) – the full documentation for the `node:test` module that shipped in Node.js 18\n* [`nodejs/node-core-test`](https://github.com/nodejs/node-core-test) – a userland port of `node:test` making it available in Node.js 14 and later (this reporter has not been tested with this userland port)\n* [`@matteo.collina/tspl`](https://github.com/mcollina/tspl) – test planner for `node:test` and `node:assert`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpelli%2Fnode-test-pretty-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpelli%2Fnode-test-pretty-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpelli%2Fnode-test-pretty-reporter/lists"}