{"id":13472081,"url":"https://github.com/socketsupply/tapzero","last_synced_at":"2025-07-29T21:47:57.854Z","repository":{"id":46294037,"uuid":"241965376","full_name":"socketsupply/tapzero","owner":"socketsupply","description":"Zero dependency test framework","archived":false,"fork":false,"pushed_at":"2023-10-02T18:57:14.000Z","size":116,"stargazers_count":35,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-28T02:55:12.257Z","etag":null,"topics":["jest","tap","tape","test","test-framework","testanythingprotocol","testing","zero-dependency"],"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/socketsupply.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-02-20T18:58:11.000Z","updated_at":"2025-07-24T14:36:12.000Z","dependencies_parsed_at":"2022-09-26T20:20:31.985Z","dependency_job_id":"a9b9144f-0b7a-4bcd-afa2-dbbfd1528a56","html_url":"https://github.com/socketsupply/tapzero","commit_stats":{"total_commits":108,"total_committers":4,"mean_commits":27.0,"dds":0.07407407407407407,"last_synced_commit":"b5e2fc20a47be8adaffb58022eed7d55a64fbb0d"},"previous_names":["raynos/tapzero"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/socketsupply/tapzero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketsupply%2Ftapzero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketsupply%2Ftapzero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketsupply%2Ftapzero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketsupply%2Ftapzero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketsupply","download_url":"https://codeload.github.com/socketsupply/tapzero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketsupply%2Ftapzero/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267765100,"owners_count":24140946,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["jest","tap","tape","test","test-framework","testanythingprotocol","testing","zero-dependency"],"created_at":"2024-07-31T16:00:51.763Z","updated_at":"2025-07-29T21:47:57.775Z","avatar_url":"https://github.com/socketsupply.png","language":"JavaScript","readme":"# @socketsupply/tapzero\n\nZero dependency test framework\n\n## Source code\n\nThe implementation is \u003c250 loc, (\u003c500 with comments) ( https://github.com/Raynos/tapzero/blob/master/index.js ) and very readable.\n\n## Migrating from tape\n\n```js\nconst tape = require('tape')\n// Tapzero exports an object with a test function property.\nconst tapzero = require('@socketsupply/tapzero').test\n```\n\n```js\ntape('my test', (t) =\u003e {\n  t.equal(2, 2, 'ok')\n  t.end()\n})\n\n// Auto ending behavior on function completion\ntapzero('my test', (t) =\u003e {\n  t.equal(2, 2, 'ok')\n  // t.end() does not exist.\n})\n```\n\n### End automatically\nReturn a promise. The test will end when the promise resolves.\n\n```js\n// tapzero \"auto\" ends async tests when the async function completes\ntapzero('my cb test', async (t) =\u003e {\n  await new Promise((resolve) =\u003e {\n    t.equal(2, 2, 'ok')\n    setTimeout(() =\u003e {\n      // instead of calling t.end(), resolve a promise\n      resolve()\n    }, 10)\n  })\n})\n```\n\n### Plan the number of assertions\n```js\ntapzero('planning example', t =\u003e {\n  // this test will fail if we execute more or fewer\n  //   than planned assertions\n  t.plan(2)\n  t.ok('hello')\n  t.equal(2, 2, 'two is two')\n})\n```\n\n### API\nNo aliases, smaller API surface area\n\n```js\ntape('my test', (t) =\u003e {\n  t.equals(2, 2)\n  t.is(2, 2)\n  t.isEqual(2, 2)\n})\n\ntapzero('my test', (t) =\u003e {\n  // tapzero does not implement any aliases, very small surface area.\n  t.equal(2, 2)\n  t.equal(2, 2)\n  t.equal(2, 2)\n})\n```\n\n## Motivation\n\nSmall library, zero dependencies\n\n```\n$ package-size ./build/src/index.js zora baretest,assert qunit tape jasmine mocha\n\n  package                      size       minified   gzipped\n  ./build/src/index.js         8.97 KB    3.92 KB    1.53 KB\n  zora@3.1.8                   32.44 KB   11.65 KB   4.08 KB\n  baretest@1.0.0,assert@2.0.0  51.61 KB   16.48 KB   5.82 KB\n  qunit@2.9.3                  195.83 KB  62.04 KB   20.38 KB\n  tape@4.13.0                  304.71 KB  101.46 KB  28.8 KB\n  jasmine@3.5.0                413.61 KB  145.2 KB   41.07 KB\n  mocha@7.0.1                  811.55 KB  273.07 KB  91.61 KB\n\n```\n\nSmall library, small install size.\n\n|        |  @socketsupply/tapzero  |  baretest  |  zora  |  pta  |  tape  |\n|--------|:---------:|:----------:|:------:|:-----:|:------:|\n|pkg size|  [![tapzero](https://packagephobia.now.sh/badge?p=@socketsupply/tapzero)](https://packagephobia.now.sh/result?p=@socketsupply/tapzero)  |  [![baretest](https://packagephobia.now.sh/badge?p=baretest)](https://packagephobia.now.sh/result?p=baretest)  |  [![zora](https://packagephobia.now.sh/badge?p=zora)](https://packagephobia.now.sh/result?p=zora)  |  [![pta](https://packagephobia.now.sh/badge?p=pta)](https://packagephobia.now.sh/result?p=pta)  |  [![tape](https://packagephobia.now.sh/badge?p=tape)](https://packagephobia.now.sh/result?p=tape)  |\n|Min.js size|  [![@socketsupply/tapzero](https://badgen.net/bundlephobia/min/@socketsupply/tapzero)](https://bundlephobia.com/result?p=@socketsupply/tapzero)  |  [![baretest](https://badgen.net/bundlephobia/min/baretest)](https://bundlephobia.com/result?p=baretest)  |  [![zora](https://badgen.net/bundlephobia/min/zora)](https://bundlephobia.com/result?p=zora)  |  [![pta](https://badgen.net/bundlephobia/min/pta)](https://bundlephobia.com/result?p=pta)  |  [![tape](https://badgen.net/bundlephobia/min/tape)](https://bundlephobia.com/result?p=tape)  |\n|dep count|  [![@socketsupply/tapzero](https://badgen.net/badge/dependencies/0/green)](https://www.npmjs.com/package/@socketsupply/tapzero)  |  [![baretest](https://badgen.net/badge/dependencies/1/green)](https://www.npmjs.com/package/baretest)  |  [![zora](https://badgen.net/badge/dependencies/0/green)](https://www.npmjs.com/package/zora)  |  [![pta](https://badgen.net/badge/dependencies/23/orange)](https://www.npmjs.com/package/pta)  |  [![tape](https://badgen.net/badge/dependencies/44/orange)](https://www.npmjs.com/package/tape)  |\n\n|        |  Mocha  |  Ava  |  Jest  |  tap  |\n|:------:|:-------:|:-----:|:------:|:-----:|\n|pkg size|  [![mocha](https://packagephobia.now.sh/badge?p=mocha)](https://packagephobia.now.sh/result?p=mocha)  |  [![ava](https://packagephobia.now.sh/badge?p=ava)](https://packagephobia.now.sh/result?p=ava) |  [![jest](https://packagephobia.now.sh/badge?p=jest)](https://packagephobia.now.sh/result?p=jest) |  [![tap](https://packagephobia.now.sh/badge?p=tap)](https://packagephobia.now.sh/result?p=tap) |\n|Min.js size|  [![mocha](https://badgen.net/bundlephobia/min/mocha)](https://bundlephobia.com/result?p=mocha)  |  [![ava](https://badgen.net/bundlephobia/min/ava)](https://bundlephobia.com/result?p=ava)  |  [![jest](https://badgen.net/bundlephobia/min/jest)](https://bundlephobia.com/result?p=jest)  |  [![tap](https://badgen.net/bundlephobia/min/tap)](https://bundlephobia.com/result?p=tap)  |\n|dep count|  [![mocha](https://badgen.net/badge/dependencies/104/red)](https://www.npmjs.com/package/mocha)  |  [![ava](https://badgen.net/badge/dependencies/300/red)](https://www.npmjs.com/package/ava)  |  [![jest](https://badgen.net/badge/dependencies/799/red)](https://www.npmjs.com/package/jest)  |  [![tap](https://badgen.net/badge/dependencies/390/red)](https://www.npmjs.com/package/tap)  |\n\n## Docs\n\n```js\nconst test = require('@socketsupply/tapzero').test\n```\n\n### `test(name, [fn])`\n\nRun a single named test case. The `fn` will be called with the `t` test object.\n\nTests run one at a time and complete when the `fn` completes, the `fn` can be async.\n\n### `test.only(name, fn)`\n\nLike `test(name, fn)` except if you use `.only` this is the only test case that will run for the entire process, all other test cases using tape will be ignored.\n\n### `test.skip(name, [fn])`\n\nCreates a test case that will be skipped\n\n## Harness docs\n\n```js\nconst testHarness = require('@socketsupply/tapzero/harness')\n```\n\nSee [HARNESS.md](./HARNESS.md)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketsupply%2Ftapzero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketsupply%2Ftapzero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketsupply%2Ftapzero/lists"}