{"id":19443450,"url":"https://github.com/tbeseda/tap-reader","last_synced_at":"2026-01-04T17:09:55.638Z","repository":{"id":200913748,"uuid":"703857621","full_name":"tbeseda/tap-reader","owner":"tbeseda","description":"smol streaming TAP parser","archived":false,"fork":false,"pushed_at":"2024-07-29T20:36:09.000Z","size":447,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T00:47:08.234Z","etag":null,"topics":["nodejs","tap","tape","testing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tap-reader","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbeseda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-12T04:01:36.000Z","updated_at":"2024-07-29T20:36:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"40295af6-73ed-486a-8a59-77ca82177260","html_url":"https://github.com/tbeseda/tap-reader","commit_stats":null,"previous_names":["tbeseda/tap-reader"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Ftap-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Ftap-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Ftap-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Ftap-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbeseda","download_url":"https://codeload.github.com/tbeseda/tap-reader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244990050,"owners_count":20543613,"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":["nodejs","tap","tape","testing"],"created_at":"2024-11-10T15:43:11.128Z","updated_at":"2026-01-04T17:09:55.594Z","avatar_url":"https://github.com/tbeseda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ccode\u003etap-reader\u003c/code\u003e 📜\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A smol, streaming \u003ca href=\"https://testanything.org/\"\u003eTAP\u003c/a\u003e parser. Works well with \u003ca href=\"https://www.npmjs.com/package/tape/\"\u003e\u003ccode\u003etape\u003c/code\u003e\u003c/a\u003e.\u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/tap-reader\"\u003e\u003cstrong\u003e\u003ccode\u003etap-reader\u003c/code\u003e on npmjs.org »\u003c/strong\u003e\u003c/a\u003e\u003cbr\u003e\n  Documentation soon...\n\u003c/p\u003e\n\nSample reporter that leverages `tap-reader`:\n\n```js\n#!/usr/bin/env node\nimport { stdin } from 'node:process';\nimport TapReader from 'tap-reader'\n\nconst write = console.log\nconst reader = TapReader({ input: stdin });\n\nreader.on('version', ({ version }) =\u003e {\n  write('VERSION', version);\n});\n\nreader.on('pass', ({ id, desc, skip, todo }) =\u003e {\n  write('PASS', id, desc, todo ? 'TODO' : skip ? 'SKIP' : '');\n});\n\nreader.on('fail', ({ id, desc, skip, todo, diag }) =\u003e {\n  write('FAIL', id, desc, todo ? 'TODO' : skip ? 'SKIP' : '');\n  \n  for (const key in diag)\n    write(`  ${key}: ${diag[key]}`);\n});\n\nreader.on('plan', ({ plan, comment, todo }) =\u003e {\n  write(`plan: ${plan[0]} → ${plan[1]} ${comment || ''} ${todo ? 'TODO' :''}`);\n})\n\nreader.on('comment', ({ comment, todo, skip }) =\u003e {\n  write('COMMENT', comment, todo ? 'TODO' : skip ? 'SKIP' : '');\n})\n\nreader.on('other', ({ line }) =\u003e {\n  if (line.trim().length \u003e 0) write('OTHER', line);\n})\n\nreader.on('done', ({ summary, ok }) =\u003e {\n  const { total, pass, fail, skip, todo } = summary;\n\n  write('DONE')\n  write(`total: ${total}`)\n  write(`pass: ${pass}`)\n  write(`fail: ${fail}`)\n  write(`skip: ${skip}`)\n  write(`todo: ${todo}`)\n  write(`OK ${ok}`)\n})\n\nreader.on('end', ({ ok }) =\u003e {\n  process.exit(ok ? 0 : 1);\n})\n```\n\nAlso see `examples/table-reporter.js` for another example.\n\n## Coming next:\n\n- [ ] More TAP features like subtests, +pragmas, etc.\n- [ ] Documentation for config and events\n- [ ] Intellisense via `.d.ts`\n\n## FAQ:\n\n**Why is `yaml` vendored?**  \nBecause the published module is large. `tap-reader` should install and run as quickly as possible in a CI environment.  \nI'm not stoked on it so this may change in the future.\n\n**Why not use `tap-parser`?**  \n`tap-parser` is great but... see above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbeseda%2Ftap-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbeseda%2Ftap-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbeseda%2Ftap-reader/lists"}