{"id":13799658,"url":"https://github.com/unional/ava-fixture","last_synced_at":"2026-01-14T21:56:31.661Z","repository":{"id":57187714,"uuid":"63132176","full_name":"unional/ava-fixture","owner":"unional","description":"Fixture test for https://github.com/avajs/ava","archived":true,"fork":false,"pushed_at":"2020-08-30T06:31:39.000Z","size":1798,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-22T20:14:50.860Z","etag":null,"topics":["ava","fixture","nodejs","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/unional.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":"2016-07-12T06:23:53.000Z","updated_at":"2023-01-28T09:53:15.000Z","dependencies_parsed_at":"2022-08-28T13:00:20.869Z","dependency_job_id":null,"html_url":"https://github.com/unional/ava-fixture","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/unional/ava-fixture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unional%2Fava-fixture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unional%2Fava-fixture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unional%2Fava-fixture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unional%2Fava-fixture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unional","download_url":"https://codeload.github.com/unional/ava-fixture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unional%2Fava-fixture/sbom","scorecard":{"id":910031,"data":{"date":"2025-08-11","repo":{"name":"github.com/unional/ava-fixture","commit":"6b0d598a650b113ba11e9c9976458bb4f8d023f1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/18 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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/unional/ava-fixture/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:21","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"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":"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/unional/.github/.github/SECURITY.md:1","Info: Found linked content: github.com/unional/.github/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/unional/.github/.github/SECURITY.md:1","Info: Found text in security policy: github.com/unional/.github/.github/SECURITY.md:1"],"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"36 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T18:46:41.641Z","repository_id":57187714,"created_at":"2025-08-24T18:46:41.641Z","updated_at":"2025-08-24T18:46:41.641Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["ava","fixture","nodejs","unit-testing"],"created_at":"2024-08-04T00:01:04.869Z","updated_at":"2026-01-14T21:56:31.643Z","avatar_url":"https://github.com/unional.png","language":"TypeScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# ava-fixture\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/unional/ava-fixture.svg)](https://greenkeeper.io/)\n\n[![stable][stable-image]][stable-url]\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\nThis library helps you to write fixture tests: test-per-folder or test-per-file.\n\n## Important Notice\n\nI have created [`@unional/fixture`](https://github.com/unional/fixture) which will replace this package.\nIt is decoupled from `ava` and can be used with any test runner.\n\nFeel free to give it a try. If you found any feature in `ava-fixture` is missing in `@unional/fixture`, please open an issue there.\n\n\n## Usage\n\nFor example, you are testing code that process files (e.g. a compiler, config-reader, etc).\n\nYou put each test case inside its own folder:\n\n```sh\n+ fixtures\n  + cases\n    + empty\n      - somefiles\n    + basic-case\n      - someOtherFiles\n    + single-line\n      - ...\n    + ...\n```\n\nYou can run each test case like this:\n\n```ts\nimport ava from 'ava';\nimport fixture from 'ava-fixture';\n\n// Point to the base folder which contain the fixtures.\n// Use relative path starts from project root or absolute path\nconst ftest = fixture(ava, 'fixtures/cases', 'fixtures/baselines', 'fixtures/results');\n\nftest.each((t, d) =\u003e {\n  // d.caseName: 'empty', 'basic-case', 'single-line', etc\n  // d.casePath: absolute path points to each test case folder\n  // d.resultPath: absolute path points to each test result folder\n\n  // Your test target reads from `d.casePath` and writes to `d.resultPath`\n  target.process(d.casePath, d.resultPath)\n\n  // d.match() will compare the result folder against the baseline folder\n  return d.match()\n})\n```\n\nYou can also use this library to run tests that only read files:\n\n```ts\nimport ava from 'ava';\nimport fixture from 'ava-fixture';\n\n// Point to the base folder which contain the fixtures.\n// Relative path starts from project root.\nconst ftest = fixture(ava, 'fixture/cases');\n\nftest('test title', 'case-1', (t, d) =\u003e {\n  // t is ava test assertion.\n  t.is(d.casePath, 'absolut path the the case folder')\n\n  const result = target.read(d.casePath)\n\n  t.deepEqual(result, 'expected result')\n});\n\n// test title can be omitted\nftest('case-1', (t, d) =\u003e {\n  // ...\n})\n\n// go through each test\nftest.each((t, d) =\u003e {\n  // ...\n})\n\n// or run certain test based on filter\nftest.each(/some filter/, (t, d) =\u003e {\n  // ...\n})\n```\n\n## Other API\n\n```ts\nimport test from 'ava';\nimport fixture from 'ava-fixture';\n\nconst ftest = fixture(test, 'fixture/cases');\n\nftest.only(...)\nftest.skip(...)\nftest.failing(...)\nftest.only.each.failing(...)\n```\n\nFor `before()`, `beforeEach()`, `after()`, `afterEach()`, `todo()`, use `ava` directly.\n\n## Contribute\n\n```sh\n# right after clone\nnpm install\n\n# begin making changes\ngit checkout -b \u003cbranch\u003e\nnpm run watch\n\n# edit `webpack.config.es5.js` and `rollup.config.es2015.js` to exclude dependencies for the bundle if needed\n\n# after making change(s)\ngit commit -m \"\u003ccommit message\u003e\"\ngit push\n\n# create PR\n```\n\n## Npm Commands\n\nThere are a few useful commands you can use during development.\n\n```sh\n# Run tests (and lint) automatically whenever you save a file.\nnpm run watch\n\n# Run tests with coverage stats (but won't fail you if coverage does not meet criteria)\nnpm run test\n\n# Manually verify the project.\n# This will be ran during 'npm preversion' so you normally don't need to run this yourself.\nnpm run verify\n\n# Build the project.\n# You normally don't need to do this.\nnpm run build\n\n# Run tslint\n# You normally don't need to do this as `npm run watch` and `npm version` will automatically run lint for you.\nnpm run lint\n```\n\nGenerated by [`generator-unional@0.9.0`](https://github.com/unional/unional-cli)\n\n[stable-image]: http://badges.github.io/stability-badges/dist/stable.svg\n[stable-url]: http://github.com/badges/stability-badges\n[npm-image]: https://img.shields.io/npm/v/ava-fixture.svg?style=flat\n[npm-url]: https://npmjs.org/package/ava-fixture\n[downloads-image]: https://img.shields.io/npm/dm/ava-fixture.svg?style=flat\n[downloads-url]: https://npmjs.org/package/ava-fixture\n[travis-image]: https://img.shields.io/travis/unional/ava-fixture/master.svg?style=flat\n[travis-url]: https://travis-ci.org/unional/ava-fixture.svg?branch=master\n[coveralls-image]: https://coveralls.io/repos/github/unional/ava-fixture/badge.svg\n[coveralls-url]: https://coveralls.io/github/unional/ava-fixture\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funional%2Fava-fixture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funional%2Fava-fixture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funional%2Fava-fixture/lists"}