{"id":28399483,"url":"https://github.com/learning-zone/react-unit-testing","last_synced_at":"2025-06-28T21:31:37.514Z","repository":{"id":52060064,"uuid":"520737018","full_name":"learning-zone/react-unit-testing","owner":"learning-zone","description":"React Unit Testing ","archived":false,"fork":false,"pushed_at":"2023-06-11T17:09:00.000Z","size":570,"stargazers_count":31,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-01T15:49:57.971Z","etag":null,"topics":["api-testing","component-testing","jest","mock-testing","react","react-testing-library","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/learning-zone.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-08-03T04:27:16.000Z","updated_at":"2024-11-11T13:24:38.000Z","dependencies_parsed_at":"2023-01-21T23:47:02.210Z","dependency_job_id":null,"html_url":"https://github.com/learning-zone/react-unit-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/learning-zone/react-unit-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learning-zone%2Freact-unit-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learning-zone%2Freact-unit-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learning-zone%2Freact-unit-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learning-zone%2Freact-unit-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learning-zone","download_url":"https://codeload.github.com/learning-zone/react-unit-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learning-zone%2Freact-unit-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262502280,"owners_count":23321113,"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":["api-testing","component-testing","jest","mock-testing","react","react-testing-library","testing"],"created_at":"2025-06-01T08:09:16.957Z","updated_at":"2025-06-28T21:31:37.508Z","avatar_url":"https://github.com/learning-zone.png","language":"JavaScript","readme":"# React Unit Testing using Jest\n\n\u003e *Click \u0026#9733; if you like the project. Your contributions are heartily ♡ welcome.*\n\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/test-react.png\" alt=\"Testing React using Jest and Enzyme\" width=\"800px\" /\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\n# Package Installation\nnpm install\n\n# Run the Project\nnpm start\n\n# Project Test\nnpm test\n\n# Generate Code Coverage Report\nnpm run test -- --coverage --watchAll=false\n```\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#react-unit-test-using-jest-and-enzyme\"\u003e↥ back to top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\n## Project Covers\n\n- Component Testing\n- Props Testing\n- Snapshot Testing\n- Event Testing\n- Mocking function\n- Rest API Testing\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#react-unit-test-using-jest-and-enzyme\"\u003e↥ back to top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\n## Folder Structure\n\n```js\n + src\n   + components\n     + Events\n\t   + __snapshots__\n\t   - Events.js  \n\t   - Events.test.js\n\t + Header\n\t   - Header.js\n\t   - Header.test.js\n\t + Props\n\t   - Props.js\n\t   - Props.test.js\n\t + RestAPI\n\t   - RestAPI.js\n\t   - RestAPI.test.js\n   + __mocks__\n     - axios.js\n```\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#react-unit-test-using-jest-and-enzyme\"\u003e↥ back to top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\n## Code Coverage Report\n\n```js\n|File                    |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\n|------------------------|----------|----------|----------|----------|-------------------|\n|All files               |    88.89 |        0 |       75 |    88.24 |                   |\n| src                    |      100 |      100 |      100 |      100 |                   |\n|  App.js                |      100 |      100 |      100 |      100 |                   |\n| src/Components/Events  |       50 |        0 |    33.33 |       50 |                   |\n|  Events.js             |       50 |        0 |    33.33 |       50 |             14,16 |\n| src/Components/Header  |      100 |      100 |      100 |      100 |                   |\n|  Header.js             |      100 |      100 |      100 |      100 |                   |\n| src/Components/Props   |      100 |      100 |      100 |      100 |                   |\n|  Props.js              |      100 |      100 |      100 |      100 |                   |\n| src/Components/RestAPI |      100 |      100 |       80 |      100 |                   |\n|  RestAPI.js            |      100 |      100 |       80 |      100 |                   |\n|------------------------|----------|----------|----------|----------|-------------------|\n```\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#react-unit-test-using-jest-and-enzyme\"\u003e↥ back to top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\n## Technology\n\n- [React](https://create-react-app.dev/docs/getting-started/)\n- [Jest](https://jestjs.io/docs/en/getting-started.html)\n- [Material-UI](https://material-ui.com/getting-started/installation/)\n- [Axios](https://github.com/axios/axios)\n- [React Testing Library](https://reactjs.org/docs/testing-recipes.html)\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#react-unit-test-using-jest-and-enzyme\"\u003e↥ back to top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearning-zone%2Freact-unit-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearning-zone%2Freact-unit-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearning-zone%2Freact-unit-testing/lists"}