{"id":15835071,"url":"https://github.com/kaelzhang/aya","last_synced_at":"2026-01-30T12:34:10.523Z","repository":{"id":57323378,"uuid":"138865035","full_name":"kaelzhang/aya","owner":"kaelzhang","description":"Just a wrapped tap, more fun.","archived":false,"fork":false,"pushed_at":"2018-07-31T16:20:36.000Z","size":513,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-28T07:45:42.166Z","etag":null,"topics":["after","before","beforeeach","nodejs","piapia","tap","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaelzhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-27T10:12:59.000Z","updated_at":"2018-10-10T15:20:47.000Z","dependencies_parsed_at":"2022-09-12T05:50:44.796Z","dependency_job_id":null,"html_url":"https://github.com/kaelzhang/aya","commit_stats":null,"previous_names":["kaelzhang/node-piapia"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/kaelzhang/aya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelzhang%2Faya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelzhang%2Faya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelzhang%2Faya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelzhang%2Faya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaelzhang","download_url":"https://codeload.github.com/kaelzhang/aya/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelzhang%2Faya/sbom","scorecard":{"id":547060,"data":{"date":"2025-08-11","repo":{"name":"github.com/kaelzhang/aya","commit":"e87bd4b150d63337ff4139af7384dcb6faefc6a7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/1 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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Warn: project license file does not contain an FSF or OSI license."],"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-20T09:48:46.848Z","repository_id":57323378,"created_at":"2025-08-20T09:48:46.848Z","updated_at":"2025-08-20T09:48:46.848Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"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":["after","before","beforeeach","nodejs","piapia","tap","testing"],"created_at":"2024-10-05T14:20:25.106Z","updated_at":"2026-01-30T12:34:10.506Z","avatar_url":"https://github.com/kaelzhang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/kaelzhang/aya.svg?branch=master)](https://travis-ci.org/kaelzhang/aya)\n[![Coverage](https://codecov.io/gh/kaelzhang/aya/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/aya)\n\u003c!-- optional appveyor tst\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/aya?branch=master\u0026svg=true)](https://ci.appveyor.com/project/kaelzhang/aya)\n--\u003e\n\u003c!-- optional npm version\n[![NPM version](https://badge.fury.io/js/aya.svg)](http://badge.fury.io/js/aya)\n--\u003e\n\u003c!-- optional npm downloads\n[![npm module downloads per month](http://img.shields.io/npm/dm/aya.svg)](https://www.npmjs.org/package/aya)\n--\u003e\n\u003c!-- optional dependency status\n[![Dependency Status](https://david-dm.org/kaelzhang/aya.svg)](https://david-dm.org/kaelzhang/aya)\n--\u003e\n\n# aya\n\n![aya](https://raw.githubusercontent.com/kaelzhang/aya/master/aya.gif)\n\nJust a wrapped [tap](https://www.npmjs.com/package/tap), more fun.\n\n## Install\n\n```sh\n$ npm i -D aya\n```\n\n## Usage\n\npackage.json\n\n```js\n{\n  \"scripts\": {\n    \"test\": \"aya test/index.js --coverage\"\n  }\n}\n```\n\ntest/index.js\n\n```js\nconst {test} = require('aya')\n\ntest.before(() =\u003e {\n  // some setup\n})\n\ntest('description', async t =\u003e {\n  const result = await getResult()\n  t.is(result, true)\n})\n```\n\nAnd then\n\n```sh\n$ npm test\n```\n\n### `t.end()` only in `test.cb`\n\nUnlike `tap`, we should only use `t.end()` in `test.cb`.\n\n```js\ntest.cb('test result with callback', t =\u003e {\n  getResult(result =\u003e {\n    t.is(result, true)\n    t.end()\n  })\n})\n```\n\n### `t.end()` is NO MORE necessary for `test`\n\n```js\ntest('sync test', t =\u003e {\n  const result = getSyncResult()\n  t.is(result, true)\n})\n\ntest('async test', async t =\u003e {\n  const result = await getAsyncResult()\n  t.is(result, true)\n\n  // t.end() here is useless and has no effect.\n})\n```\n\n### Lifecycles\n\n`aya` supports FOUR lifecycle methods which are listed below according to the executing sequence:\n\n- `test.before(fn)`\n- `test.beforeEach(fn)`\n- `test.afterEach(fn)`\n- `test.after(fn)`\n\n```js\n// Both sync and async functions are supported\ntest.before(async t =\u003e {\n  await startServer()\n\n  // We could do assertions inside lifecycle methods\n  t.is(await getServerPort(), 8080)\n})\n```\n\nWe could also define lifecycle methods by using setters:\n\n```js\ntest.before = async t =\u003e {\n  await startServer()\n  t.is(await getServerPort(), 8080)\n}\n```\n\n## Command Line\n\nThe command line interface of `aya` is exactly the same as [`tap`](https://www.npmjs.com/package/tap).\n\nFor example, if we want to use `aya` with `codecov`\n\n```sh\n$ npm i -D aya codecov\n```\n\npackage.json\n\n```js\n{\n  \"scripts\": {\n    \"test\": \"aya test/index.js --coverage\",\n    \"posttest\": \"aya --coverage-report=html \u0026\u0026 codecov\"\n  }\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaelzhang%2Faya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaelzhang%2Faya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaelzhang%2Faya/lists"}