{"id":25000140,"url":"https://github.com/thinkmill/jest-expect-contain-deep","last_synced_at":"2025-04-12T08:44:29.304Z","repository":{"id":46938720,"uuid":"104339015","full_name":"Thinkmill/jest-expect-contain-deep","owner":"Thinkmill","description":"Assert deeply nested values in Jest","archived":false,"fork":false,"pushed_at":"2023-01-12T09:53:09.000Z","size":327,"stargazers_count":66,"open_issues_count":17,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T00:17:10.008Z","etag":null,"topics":["assertion","deep","jest","matcher","test"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/Thinkmill.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":"2017-09-21T11:21:54.000Z","updated_at":"2024-09-24T18:27:24.000Z","dependencies_parsed_at":"2023-02-09T11:15:47.854Z","dependency_job_id":null,"html_url":"https://github.com/Thinkmill/jest-expect-contain-deep","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/Thinkmill%2Fjest-expect-contain-deep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thinkmill%2Fjest-expect-contain-deep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thinkmill%2Fjest-expect-contain-deep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thinkmill%2Fjest-expect-contain-deep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thinkmill","download_url":"https://codeload.github.com/Thinkmill/jest-expect-contain-deep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543825,"owners_count":21121837,"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":["assertion","deep","jest","matcher","test"],"created_at":"2025-02-04T19:31:31.522Z","updated_at":"2025-04-12T08:44:29.285Z","avatar_url":"https://github.com/Thinkmill.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-expect-contain-deep\n\n\u003e Assert deeply nested values in [Jest](https://facebook.github.io/jest/)\n\n## Installation\n\n```sh\nyarn add --dev jest-expect-contain-deep\n```\n\n## Usage\n\n**Before:**\n\n```js\nconst containDeep = require('jest-expect-contain-deep');\n\ntest('values', () =\u003e {\n  let massiveObject = getMassiveObject();\n  expect(massiveObject.foo).toBe(expect.arrayContaining([1, 2]));\n  expect(massiveObject.bar.prop).toBe(true);\n  expect(massiveObject.baz).toContain('bar');\n});\n\ntest('spies', () =\u003e {\n  doSomething();\n  expect(mySpy.mock.calls[0][0].foo).toBe(expect.arrayContaining([1, 2]));\n  expect(mySpy.mock.calls[0][0].bar.prop).toBe(true);\n  expect(mySpy.mock.calls[0][0].baz).toContain('bar');\n});\n```\n\n**After:**\n\n```js\nconst containDeep = require('jest-expect-contain-deep');\n\ntest('values', () =\u003e {\n  expect(getMassiveObject()).toEqual(containDeep({\n    foo: [1, 2],\n    bar: { prop: true },\n    baz: expect.stringContaining('bar'),\n  }));\n});\n\ntest('spies', () =\u003e {\n  doSomething();\n  expect(mySpy).toHaveBeenCalledWith('arg1', containDeep({\n    foo: [1, 2],\n    bar: { prop: true },\n    baz: expect.stringContaining('bar'),\n  }));\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkmill%2Fjest-expect-contain-deep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkmill%2Fjest-expect-contain-deep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkmill%2Fjest-expect-contain-deep/lists"}