{"id":17983494,"url":"https://github.com/techjacker/tap-wrapper","last_synced_at":"2026-06-29T20:32:00.747Z","repository":{"id":8992965,"uuid":"10742260","full_name":"techjacker/tap-wrapper","owner":"techjacker","description":"Get node-tap results returned in JSON rather than printing to STDOUT","archived":false,"fork":false,"pushed_at":"2013-06-18T18:20:41.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T17:17:06.893Z","etag":null,"topics":[],"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/techjacker.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}},"created_at":"2013-06-17T16:55:43.000Z","updated_at":"2014-03-02T15:31:12.000Z","dependencies_parsed_at":"2022-09-11T02:20:26.695Z","dependency_job_id":null,"html_url":"https://github.com/techjacker/tap-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techjacker/tap-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Ftap-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Ftap-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Ftap-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Ftap-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjacker","download_url":"https://codeload.github.com/techjacker/tap-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Ftap-wrapper/sbom","scorecard":{"id":872003,"data":{"date":"2025-08-11","repo":{"name":"github.com/techjacker/tap-wrapper","commit":"4a8f8ec321e99375511df7077abb938f2734efad"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T04:33:30.008Z","repository_id":8992965,"created_at":"2025-08-24T04:33:30.009Z","updated_at":"2025-08-24T04:33:30.009Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34942665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":[],"created_at":"2024-10-29T18:17:24.356Z","updated_at":"2026-06-29T20:32:00.717Z","avatar_url":"https://github.com/techjacker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tap-wrapper\n\n[![Build Status](https://secure.travis-ci.org/techjacker/tap-wrapper.png)](http://travis-ci.org/techjacker/tap-wrapper)\n\n## Description\n- utility to prevent [node-tap](https://github.com/isaacs/node-tap) test results printing to STDOUT\n- receive test results in JSON format\n\n### How does it help you?\n- good for testing tap test helpers\n- used in unit tests for [tap-test-helpers](https://npmjs.org/package/tap-test-helpers) module\n\n## Install\n```Shell\nnpm install tap-wrapper\n```\n\n### Docs\n[Yuidocs documentation here](docs/index.html)\n- link only works when checkout repo and preview README locally\n\n\n## Api\n\n#### Helper Test Function (```helperTestFn```) to be wrapped\nMust do 2 things:\n1. call ```this.end(t)``` instead of ```t.end()```\n\t- don't forget to pass the ```t``` param to ```this.end```\n2. bind tap.Test to this, eg:\n\t```return require('tap').Test('test banner', function (t) {....}.bind(this));```\n\n```JavaScript\nvar helperTestFn = function (paramToPass) {\n\treturn require('tap').Test(testName, function (t) {\n\t\tt.equal(paramToPass, testName, 'Integration Test: WrapLoud is called');\n\t\tthis.end(t);\n\t}.bind(this));\n};\n```\n\n#### ```Wrap.WrapSilent(helperTestFn)```\n- Wrap a function and and prevent results for going to STDOUT\n- Listen for tap.Producer 'end evt' for results of tests to be delivered in JSON format, eg:\n\n```JavaScript\nvar helperTestFnSilent = require('tap-wrapper').WrapSilent(function () {\n\treturn require('tap').Test('test banner', function (t) {....}.bind(this));\n});\n\nhelperTestFnSilent.Producer.on(\"end\", function (er, total, ok) {\n\tconsole.log('JSON representation of tap.test results', this.results);\n});\n\n// trigger test after bound to Producer end evt\n// tap test harness is silenced (does not print to STDOUT)\nhelperTestFnSilent.test();\n```\n\n\n#### ```Wrap.WrapLoud(helperTestFn)```\n- Wrap a function and allow tap tests to print to STDOUT as normal\n\n```JavaScript\nvar helperTestFnLoud = require('tap-wrapper').WrapLoud(function () {\n\treturn require('tap').Test('test banner', function (t) {....}.bind(this));\n});\n// tap test harness prints to STDOUT as normal (ie not intercepted)\nhelperTestFnLoud();\n```\n\n\n## Full Example\n\n```JavaScript\nvar test \t\t\t   = require('tap').Test,\n\ttestName           = 'randomTest',\n\thelperTestFn       = function (paramToPass) {\n\t\treturn test(testName, function (t) {\n\t\t\tcounter += 1;\n\t\t\tt.equal(paramToPass, testName, 'Integration Test: WrapLoud is called');\n\t\t\tthis.end(t);\n\t\t}.bind(this));\n\t},\n\thelperTestFnSilent = main.WrapSilent(helperTestFn),\n\thelperTestFnLoud   = main.WrapLoud(helperTestFn);\n\nhelperTestFnSilent.Producer.on(\"end\", function (er, total, ok) {\n\n\t\tvar results = this.results;\n\t\ttest('Integration Test: WrapSilent: wrappedFn.Producer end evt triggered', function (t) {\n\t\t\tt.equal(results.testsTotal, 1, '1 test in total');\n\t\t\tt.equal(results.pass, 1, '1 pass in total');\n\t\t\tt.equal(counter, 2, 'both silent and loud tests are called');\n\t\t\tt.end();\n\t\t});\n\n});\n\n// prints to STDOUT as normal\nhelperTestFnLoud(testName);\n\n// silenced \u003e collect results in JSON thru .Producer 'end' evt\nhelperTestFnSilent.test(testName);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Ftap-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjacker%2Ftap-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Ftap-wrapper/lists"}