{"id":20435939,"url":"https://github.com/d4nyll/jest-matcher-one-of","last_synced_at":"2025-04-12T21:36:21.962Z","repository":{"id":26855747,"uuid":"111206992","full_name":"d4nyll/jest-matcher-one-of","owner":"d4nyll","description":"A Jest matcher to test if a value is one of many (like enums).","archived":false,"fork":false,"pushed_at":"2024-06-04T21:36:56.000Z","size":795,"stargazers_count":5,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:48:07.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/d4nyll.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,"publiccode":null,"codemeta":null}},"created_at":"2017-11-18T13:17:30.000Z","updated_at":"2023-03-10T09:27:03.000Z","dependencies_parsed_at":"2024-06-18T22:43:29.376Z","dependency_job_id":"ed43c4ee-b90f-4e5e-ab64-ab6da4ffea97","html_url":"https://github.com/d4nyll/jest-matcher-one-of","commit_stats":{"total_commits":27,"total_committers":5,"mean_commits":5.4,"dds":"0.37037037037037035","last_synced_commit":"288a1147458ec4111ede22d2720e3a00e19e3698"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fjest-matcher-one-of","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fjest-matcher-one-of/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fjest-matcher-one-of/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fjest-matcher-one-of/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4nyll","download_url":"https://codeload.github.com/d4nyll/jest-matcher-one-of/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637347,"owners_count":21137531,"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":[],"created_at":"2024-11-15T08:38:33.771Z","updated_at":"2025-04-12T21:36:21.930Z","avatar_url":"https://github.com/d4nyll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-matcher-one-of\n\n[![Build Status](https://travis-ci.org/d4nyll/jest-matcher-one-of.svg?branch=master)](https://travis-ci.org/d4nyll/jest-matcher-one-of)\n[![codecov](https://codecov.io/gh/d4nyll/jest-matcher-one-of/branch/master/graph/badge.svg)](https://codecov.io/gh/d4nyll/jest-matcher-one-of)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/d301a1416e9ef124382f/test_coverage)](https://codeclimate.com/github/d4nyll/jest-matcher-one-of/test_coverage) \n[![CodeFactor](https://www.codefactor.io/repository/github/d4nyll/jest-matcher-one-of/badge)](https://www.codefactor.io/repository/github/d4nyll/jest-matcher-one-of)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9ab3b405ea4c4c9297759dce2cea8e10)](https://www.codacy.com/app/d4nyll/jest-matcher-one-of?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=d4nyll/jest-matcher-one-of\u0026amp;utm_campaign=Badge_Grade)\n[![Maintainability](https://api.codeclimate.com/v1/badges/d301a1416e9ef124382f/maintainability)](https://codeclimate.com/github/d4nyll/jest-matcher-one-of/maintainability) \n[![Known Vulnerabilities](https://snyk.io/test/github/d4nyll/jest-matcher-one-of/badge.svg)](https://snyk.io/test/github/d4nyll/jest-matcher-one-of)\n[![Greenkeeper badge](https://badges.greenkeeper.io/d4nyll/jest-matcher-one-of.svg)](https://greenkeeper.io/)\n\nA Jest matcher (`toBeOneOf`) to test if a value is one of many (like enums).\n\n## Installation\n\n1. Add the package\n\n    ```sh\n    yarn add jest-matcher-one-of --dev\n    npm install jest-matcher-one-of --save-dev\n    ```\n\n2. Require the package at the root of your test files\n\n    ```js\n    require('jest-matcher-one-of');\n    import 'jest-matcher-one-of'; // Using ES6 w/ Babel or TypeScript\n    ```\n\n## Usage\n\n```js\nexpect(1).toBeOneOf([1, 2]);\nexpect(1).not.toBeOneOf([2, 3, 4]);\nexpect(1).toBeOneOf(1); // Also forgiving for non-array values\n```\n\n## Contributing\n\nGet the source code and run the tests.\n\n```sh\n$ git clone git@github.com:d4nyll/jest-matcher-one-of.git\n$ yarn        # or npm install\n$ yarn test   # or npm test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fjest-matcher-one-of","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4nyll%2Fjest-matcher-one-of","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fjest-matcher-one-of/lists"}