{"id":13799762,"url":"https://github.com/TomerAberbach/pava","last_synced_at":"2025-05-13T08:31:57.162Z","repository":{"id":57320925,"uuid":"400342073","full_name":"TomerAberbach/pava","owner":"TomerAberbach","description":"🚀 Parameterized tests for ava!","archived":false,"fork":false,"pushed_at":"2024-10-15T03:39:12.000Z","size":425,"stargazers_count":8,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-08T19:06:38.035Z","etag":null,"topics":["ava","avajs","nodejs","parameterized","parameterized-tests","parametric","testing","testing-library"],"latest_commit_sha":null,"homepage":"https://npm.im/pava","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomerAberbach.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","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,"publiccode":null,"codemeta":null}},"created_at":"2021-08-27T00:29:07.000Z","updated_at":"2024-10-15T03:39:16.000Z","dependencies_parsed_at":"2024-01-05T21:13:19.726Z","dependency_job_id":"0eb1222e-c849-4834-ac0a-5da21d00a1f0","html_url":"https://github.com/TomerAberbach/pava","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"f782f3287a55c679f2f47dc7138f14a350f54bb5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomerAberbach","download_url":"https://codeload.github.com/TomerAberbach/pava/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253903851,"owners_count":21981760,"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","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","avajs","nodejs","parameterized","parameterized-tests","parametric","testing","testing-library"],"created_at":"2024-08-04T00:01:05.839Z","updated_at":"2025-05-13T08:31:56.847Z","avatar_url":"https://github.com/TomerAberbach.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  pava\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/pava\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/v/pava\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TomerAberbach/pava/actions\"\u003e\n    \u003cimg src=\"https://github.com/TomerAberbach/pava/workflows/CI/badge.svg\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=pava\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/minzip/pava\" alt=\"minzip size\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  Parameterized tests for \u003ca href=\"https://github.com/avajs/ava\"\u003eava\u003c/a\u003e!\n\u003c/div\u003e\n\n## Install\n\n```sh\n$ npm i pava\n```\n\n## Usage\n\n```js\nimport test from 'ava'\nimport parameterized from 'pava'\nimport { mySerialize, myDeserialize, myMax } from './my-code.js'\n\n// Writing your test like this...\nparameterized(\n  test,\n  `integer serializing and deserializing`,\n  {\n    zero: 0,\n    negative: -4,\n    positive: 5,\n    large: 100000,\n  },\n  (t, integer) =\u003e {\n    t.is(myDeserialize(mySerialize(integer)), integer)\n  },\n)\n\n// Is the same as writing it like this!\ntest(`integer serializing and deserializing - zero`, t =\u003e {\n  t.is(myDeserialize(mySerialize(0)), 0)\n})\ntest(`integer serializing and deserializing - negative`, t =\u003e {\n  t.is(myDeserialize(mySerialize(-4)), -4)\n})\ntest(`integer serializing and deserializing - positive`, t =\u003e {\n  t.is(myDeserialize(mySerialize(5)), 5)\n})\ntest(`integer serializing and deserializing - large`, t =\u003e {\n  t.is(myDeserialize(mySerialize(100000)), 100000)\n})\n\n// And writing your test like this...\nparameterized(\n  test,\n  `integer serializing and deserializing`,\n  [0, -4, 5, 100000],\n  (t, integer) =\u003e {\n    t.is(myDeserialize(mySerialize(integer)), integer)\n  },\n)\n\n// Is the same as writing it like this!\n// Note: the titles aren't as nice for large test case objects\ntest(`integer serializing and deserializing - 0`, t =\u003e {\n  t.is(myDeserialize(mySerialize(0)), 0)\n})\ntest(`integer serializing and deserializing - -4`, t =\u003e {\n  t.is(myDeserialize(mySerialize(-4)), -4)\n})\ntest(`integer serializing and deserializing - 5`, t =\u003e {\n  t.is(myDeserialize(mySerialize(5)), 5)\n})\ntest(`integer serializing and deserializing - 100000`, t =\u003e {\n  t.is(myDeserialize(mySerialize(100000)), 100000)\n})\n\n// Destructure object literals to test functions with multiple parameters!\nparameterized(\n  test,\n  `maximum of two integers`,\n  {\n    sameInteger: { first: 2, second: 2, expected: 2 },\n    twoPositive: { first: 2, second: 3, expected: 3 },\n    onePositiveOneNegative: { first: 2, second: -3, expected: 2 },\n    twoNegative: { first: -2, second: -3, expected: -2 },\n  },\n  (t, { first, second, expected }) =\u003e {\n    t.is(myMax(first, second), expected)\n  },\n)\n\n// You can also use any ava test interface!\nparameterized(test.serial /* ... */)\nparameterized(test.failing /* ... */)\nparameterized(test.only /* ... */)\nparameterized(test.skip /* ... */)\nparameterized(test.todo /* ... */)\n// etc.\n```\n\nSee the\n[type definitions](https://github.com/TomerAberbach/pava/blob/main/src/index.d.ts)\nfor more documentation.\n\n## Contributing\n\nStars are always welcome!\n\nFor bugs and feature requests,\n[please create an issue](https://github.com/TomerAberbach/pava/issues/new).\n\nFor pull requests, please read the\n[contributing guidelines](https://github.com/TomerAberbach/pava/blob/main/contributing.md).\n\n## License\n\n[Apache 2.0](https://github.com/TomerAberbach/pava/blob/main/license)\n\nThis is not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomerAberbach%2Fpava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomerAberbach%2Fpava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomerAberbach%2Fpava/lists"}