{"id":16974272,"url":"https://github.com/jerone/assert-includes","last_synced_at":"2026-04-11T22:02:53.154Z","repository":{"id":62239815,"uuid":"544548680","full_name":"jerone/assert-includes","owner":"jerone","description":"Assert string includes","archived":false,"fork":false,"pushed_at":"2023-06-03T15:28:23.000Z","size":532,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T16:34:34.183Z","etag":null,"topics":["assert","testing"],"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/jerone.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},"funding":{"github":"jerone","issuehunt":"jerone","patreon":"jerone","custom":["https://www.buymeacoffee.com/jerone","https://paypal.me/jeronevw"]}},"created_at":"2022-10-02T18:52:09.000Z","updated_at":"2022-11-19T14:02:42.000Z","dependencies_parsed_at":"2025-01-26T15:37:21.448Z","dependency_job_id":null,"html_url":"https://github.com/jerone/assert-includes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerone%2Fassert-includes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerone%2Fassert-includes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerone%2Fassert-includes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerone%2Fassert-includes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerone","download_url":"https://codeload.github.com/jerone/assert-includes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244868035,"owners_count":20523581,"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":["assert","testing"],"created_at":"2024-10-14T01:05:52.821Z","updated_at":"2026-04-11T22:02:48.134Z","avatar_url":"https://github.com/jerone.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jerone","https://issuehunt.io/r/jerone","https://patreon.com/jerone","https://www.buymeacoffee.com/jerone","https://paypal.me/jeronevw"],"categories":[],"sub_categories":[],"readme":"# assert-includes\n\n\u003e Assert string includes\n\nAssert that an value is included in a string.\n\n## Installation\n\nMost likely you want to use this package as development dependency.\n\n```sh\nnpm install @jerone/assert-includes --save-dev\n```\n\nOr with Yarn:\n```sh\nyarn add @jerone/assert-includes --dev\n```\n\n## Usage\n\n```js\nimport assertIncludes from '@jerone/assert-includes';\n\ntest(\"value contains string\", () =\u003e {\n  assertIncludes(\"abc\", \"a\");\n});\n```\n\nIf the test fails, it will throw an `AssertionError`,\nwhich can be picked up by your testing library.\n\nFor example with Jest, it will produce the following log:\n\n![Jest log](https://raw.githubusercontent.com/jerone/assert-includes/master/docs/failing-test.png)\n\n## API\n\n### assertIncludes(value, includes)\n\nReturns `true` when valid or throws `AssertionError` when invalid.\n\n#### value\n\nType: `string`\n\nActual value expected to contain the included text.\n\n#### includes\n\nType: `string`\n\nThe text that is expected to be part of the `value`.\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerone%2Fassert-includes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerone%2Fassert-includes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerone%2Fassert-includes/lists"}