{"id":15416805,"url":"https://github.com/filipoliko/react-testing-library-shallow","last_synced_at":"2025-03-01T23:30:55.143Z","repository":{"id":39603813,"uuid":"506653812","full_name":"Filipoliko/react-testing-library-shallow","owner":"Filipoliko","description":null,"archived":true,"fork":false,"pushed_at":"2025-02-06T12:12:39.000Z","size":25,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T12:47:50.760Z","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/Filipoliko.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":"2022-06-23T13:34:49.000Z","updated_at":"2025-02-06T12:13:20.000Z","dependencies_parsed_at":"2022-09-20T06:11:28.232Z","dependency_job_id":null,"html_url":"https://github.com/Filipoliko/react-testing-library-shallow","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Filipoliko%2Freact-testing-library-shallow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Filipoliko%2Freact-testing-library-shallow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Filipoliko%2Freact-testing-library-shallow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Filipoliko%2Freact-testing-library-shallow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Filipoliko","download_url":"https://codeload.github.com/Filipoliko/react-testing-library-shallow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241439484,"owners_count":19963095,"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-10-01T17:13:52.655Z","updated_at":"2025-03-01T23:30:55.133Z","avatar_url":"https://github.com/Filipoliko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Testing Library Shallow\n\n**Project abandoned! Check out [shallow-react-snapshot](https://www.npmjs.com/package/shallow-react-snapshot) instead.**\n\nThis library implements `shallow` rendering for [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/).\n\n*Work in progress! This library is currently optimized only for [Jest](https://jestjs.io) with [`@swc/jest`](https://www.npmjs.com/package/@swc/jest) used for the code transpilation.*\n\n## Setup\n\nFollowing configuration of `@swc/jest` is needed.\n\n```javascript\n{\n    jsc: {\n        transform: {\n            react: {\n                pragma: '__reactTestingLibraryShallow.createElement',\n                runtime: 'classic',\n            },\n        },\n    },\n},\n```\n\nFollowing configuration of `jest` is needed.\n\n```javascript\n{\n    // This setup file entry should be used as early as possible\n    setupFiles: ['react-testing-library-shallow/lib/setup.js'],\n}\n```\n\n## Usage\n\n```javascript\nimport shallow from 'react-testing-library-shallow';\nimport MyComponent from './MyComponent';\n\ndescribe('MyComponent', () =\u003e {\n    test('can be shallow rendered', () =\u003e {\n        expect(shallow(\u003cMyComponent value={1} /\u003e)).toMatchSnapshot();\n    });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipoliko%2Freact-testing-library-shallow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipoliko%2Freact-testing-library-shallow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipoliko%2Freact-testing-library-shallow/lists"}