{"id":24848697,"url":"https://github.com/lucasgianine/jest-software-unit-testing","last_synced_at":"2025-03-26T11:12:29.192Z","repository":{"id":223207998,"uuid":"759589787","full_name":"lucasgianine/jest-software-unit-testing","owner":"lucasgianine","description":"🃏 Using the JestJS library created by Facebook to create unit tests/automated tests for software.","archived":false,"fork":false,"pushed_at":"2024-02-19T00:34:24.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T12:16:42.412Z","etag":null,"topics":["automated-testing","unit-testing"],"latest_commit_sha":null,"homepage":"https://jestjs.io/","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/lucasgianine.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}},"created_at":"2024-02-19T00:03:01.000Z","updated_at":"2024-02-19T00:30:33.000Z","dependencies_parsed_at":"2024-02-19T01:38:51.496Z","dependency_job_id":"56866217-94b3-43ee-9710-ad8fdbefe56f","html_url":"https://github.com/lucasgianine/jest-software-unit-testing","commit_stats":null,"previous_names":["lucasgianine/jest-software-unit-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgianine%2Fjest-software-unit-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgianine%2Fjest-software-unit-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgianine%2Fjest-software-unit-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgianine%2Fjest-software-unit-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasgianine","download_url":"https://codeload.github.com/lucasgianine/jest-software-unit-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245641442,"owners_count":20648644,"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":["automated-testing","unit-testing"],"created_at":"2025-01-31T12:16:47.533Z","updated_at":"2025-03-26T11:12:29.162Z","avatar_url":"https://github.com/lucasgianine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unit and Automated Testing | JEST Library 🃏\n## What are Unit Testing/Automated Testing?\nUnit tests are procedures used in software engineering to validate the smallest testable part of an application, such as functions or methods. The goal is to ensure that each unit performs as expected. Automated tests are those performed by a machine, validating if different parts of the software are working correctly without manual intervention.\n\n## When to Use Unit Tests\nUnit tests are essential:\n- **During Development:** To ensure new functionalities do not break existing features.\n- **Before Refactoring:** To ensure changes in code do not alter the expected behavior.\n- **For Documentation:** They serve as examples of how to use the tested units.\n\n## Quick Guide on How to Perform Unit Testing Using JEST and JavaScript\n#### 1. Environment Setup\nInstall JEST as a development dependency:\n```bash\nnpm install --save-dev jest\n```\n\nIn your `package.json`, add or modify the test script to use Jest:\n```json\n\"scripts\": {\n  \"test\": \"jest --coverage\"\n}\n```\n\n#### 2. Running the Tests\nExecute the following command in the terminal:\n```bash\nnpm test\n```\n\nJest will automatically find test files and execute them. If everything is correct, you will see an output indicating that the test passed.\n\n## Result\n![image](https://github.com/lucasgianine/jest-software-unit-testing/assets/125743142/00176d4d-3ec2-4251-875e-9ad5810f810a)\n\n## About repo\n![GitHub last commit](https://img.shields.io/github/last-commit/lucasgianine/jest-software-unit-testing)\n\n*(README criado com ajuda de IA)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasgianine%2Fjest-software-unit-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasgianine%2Fjest-software-unit-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasgianine%2Fjest-software-unit-testing/lists"}