{"id":15434029,"url":"https://github.com/sebinsua/test-react-shallow-equal","last_synced_at":"2026-04-11T05:33:57.259Z","repository":{"id":143142265,"uuid":"103239995","full_name":"sebinsua/test-react-shallow-equal","owner":"sebinsua","description":"🐢💨💨💨 Unit test against performance problems.","archived":false,"fork":false,"pushed_at":"2017-09-25T09:21:29.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T18:38:03.494Z","etag":null,"topics":["jasmine","jest","matchers","performance","react","redux","render","shallow-compare","shallow-equal","test","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebinsua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-12T07:54:10.000Z","updated_at":"2017-09-22T21:56:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"20d02207-e611-408f-886b-fb7ca01f8363","html_url":"https://github.com/sebinsua/test-react-shallow-equal","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"9c9ad6639aea4624bb35556f9ebed2d4a7a7ccfc"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sebinsua/test-react-shallow-equal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Ftest-react-shallow-equal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Ftest-react-shallow-equal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Ftest-react-shallow-equal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Ftest-react-shallow-equal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebinsua","download_url":"https://codeload.github.com/sebinsua/test-react-shallow-equal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Ftest-react-shallow-equal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31670048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["jasmine","jest","matchers","performance","react","redux","render","shallow-compare","shallow-equal","test","unit-testing"],"created_at":"2024-10-01T18:36:46.884Z","updated_at":"2026-04-11T05:33:57.225Z","avatar_url":"https://github.com/sebinsua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `test-react-shallow-equal`\n\u003e Unit test against inadvertent performance problems.\n\nProvides a `toShallowEqual` matcher for `jest` and `jasmine`. This matcher can aid in writing performant code as it allows you to write unit tests which [ensure that `shallowEqual` always returns `true` when the underlying values tested have not changed](https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f).\n\n## Usage\n\nThe tests give examples of how to use this to test [`mapStateToProps`](./packages/jest-react-shallow-equal/src/__tests__/mapStateToProps.js), [higher-order components (HOCs)](./packages/jest-react-shallow-equal/src/__tests__/HOC.js) and normal [component renders](./packages/test-react-shallow-equal/src/__tests__/ensureInternalPropsAreShallowEqual.js).\n\n## Install\n\n### Installing `jest` matchers\n\n```sh\nnpm install --save-dev jest-react-shallow-equal\n```\n\n```js\nimport installShallowEqualMatcher from 'jest-react-shallow-equal'\n\ninstallShallowEqualMatcher()\n\ntest('should x when y', () =\u003e {\n  // ...\n})\n```\n\n### Installing `jasmine` matchers\n\n```sh\nnpm install --save-dev jasmine-react-shallow-equal\n```\n\nThe `installShallowEqualMatcher` function must be called within a spec's `beforeEach` or `beforeAll` and must be run before testing code.\n\n```js\nimport installShallowEqualMatcher from 'jasmine-react-shallow-equal'\n\ndescribe('some suite', () =\u003e {\n  beforeAll(() =\u003e installShallowEqualMatcher())\n\n  it('some test', () =\u003e {\n    // ...\n  })\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Ftest-react-shallow-equal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebinsua%2Ftest-react-shallow-equal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Ftest-react-shallow-equal/lists"}