{"id":17992893,"url":"https://github.com/leostera/tap-idris","last_synced_at":"2026-01-19T02:03:28.064Z","repository":{"id":141535020,"uuid":"86864102","full_name":"leostera/tap-idris","owner":"leostera","description":":beers: A simple TAP producer and consumer/reporter for Idris","archived":false,"fork":false,"pushed_at":"2017-04-08T19:06:56.000Z","size":34,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T04:45:56.318Z","etag":null,"topics":["idris","tap","tap-producer","tests"],"latest_commit_sha":null,"homepage":"","language":"Idris","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-03-31T22:10:51.000Z","updated_at":"2023-04-12T07:08:39.000Z","dependencies_parsed_at":"2023-08-15T23:51:31.684Z","dependency_job_id":null,"html_url":"https://github.com/leostera/tap-idris","commit_stats":null,"previous_names":["leostera/tap-idris"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leostera/tap-idris","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Ftap-idris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Ftap-idris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Ftap-idris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Ftap-idris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/tap-idris/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Ftap-idris/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28557784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["idris","tap","tap-producer","tests"],"created_at":"2024-10-29T20:09:35.751Z","updated_at":"2026-01-19T02:03:28.032Z","avatar_url":"https://github.com/leostera.png","language":"Idris","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `TAP`\n\u003e 🍻 A simple TAP producer for Idris and an even simpler consumer\n\n`TAP` is a terse, minimalistic, text-based protocol for reporting test\nresults. Read more at [www.testanything.org](https://testanything.org)\n\nNote: this is just something I hacked together to produce consistent test\nresults for a small Lisp parser: [Libra](https://github.com/ostera/libra).\n\n## Quick Start\n\nRun `make` to build the library and the conusmer binary and install the library.\n\n\u003e Note: make sure to put the `draft` binary somewhere in your path if you want\n\u003e to use it!\n\n## Using the TAP Producer Library\n\nThe interface is fairly straightforward, a single function for planning:\n\n```idris\nplan : (suite : String) -\u003e Vect n (Lazy (IO Bool)) -\u003e IO ()\n```\n\nAnd you can use it like this:\n\n```idris\nmodule Your.Module.Tests\n\nimport TAP\n\ntestCase : Lazy (IO Bool)\ntestCase = case compare (1+1) 2 of\n              EQ =\u003e pure True\n              LT =\u003e pure False\n              GT =\u003e pure False\n\nmyTestSuite : IO ()\nmyTestSuite = plan \"Some description\" [\n  Delay (testCase),\n]\n```\n\nSo it's _almost_ compliant with the interface of current Idris tests:\n\n1. add `Your.Module.Tests.myTestSuite` to the list of tests in your `*.ipkg` file and\n2. run `idris --testpkg *.ipkg`\n\nAnd you should see an output like:\n\n```\nostera λ make test\nTAP version 13\n1..2\nok 1\nnot ok 2\n```\n\n#### Why `Lazy (IO Bool)`\n\nI figured that some tests might want to perform some side-effects (reading a\nfixture file sounds like the most likely scenario) and if I didn't include the\nwrapper at this point we'd need to also provide an IO-aware version of `plan`.\n\nFeel encouraged to challenge and teach me why this is the wrong approach.\n\n## Using the `draft` consumer utility\n\nThe binary itself _reads_ TAP output, so you can pipe the output of your test\ncommand into it:\n\n```\nostera λ make test | draft\n...\n# ok 2\n# not ok 1\n# skipped 0\n# summary 2/3 tests, 67% okay\n```\n\nIt's extremely simple but it gives me something to work with for the time being.\n\n## Specification\n\nThis is a list of things I'd like the TAP producer to eventually produce the\nfollowing parts of a typical TAP output:\n\n- [X] `TAP version 13`\n- [X] `# Description`\n- [X] `1..N`\n- [X] `ok 1`\n- [X] `not ok 2`\n- [ ] `ok 3 with a test case description`\n- [ ] `ok 4 # TODO with an explanation`\n- [ ] `ok 5 # SKIP with an explanaation`\n\nBut it'd also be nice to have a consumer of the output to produce more\ninteresting reports, such as:\n\n- [x] `# ok 4`\n- [x] `# not ok 1`\n- [X] `# skipped 0`\n- [ ] `# todo 0`\n- [X] `# summary 1/5 tests, 80.00% okay`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Ftap-idris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Ftap-idris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Ftap-idris/lists"}