{"id":22861541,"url":"https://github.com/sharonnavarro/angular-testing-course","last_synced_at":"2026-05-07T09:36:16.029Z","repository":{"id":267694449,"uuid":"901993676","full_name":"SharonNavarro/angular-testing-course","owner":"SharonNavarro","description":"Angular proyect with Jest as JavaScript testing framework","archived":false,"fork":false,"pushed_at":"2025-01-07T02:18:54.000Z","size":358,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T12:51:28.299Z","etag":null,"topics":["angular","jest","karma","testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/SharonNavarro.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":"2024-12-11T17:41:30.000Z","updated_at":"2025-01-07T02:18:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c527ee2-b1ff-4e0f-aa89-44d6174ac24a","html_url":"https://github.com/SharonNavarro/angular-testing-course","commit_stats":null,"previous_names":["sharonnavarro/angular-testing-course"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SharonNavarro/angular-testing-course","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharonNavarro%2Fangular-testing-course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharonNavarro%2Fangular-testing-course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharonNavarro%2Fangular-testing-course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharonNavarro%2Fangular-testing-course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharonNavarro","download_url":"https://codeload.github.com/SharonNavarro/angular-testing-course/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharonNavarro%2Fangular-testing-course/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004184,"owners_count":26083688,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":["angular","jest","karma","testing","unit-testing"],"created_at":"2024-12-13T10:09:30.865Z","updated_at":"2025-10-10T14:05:06.850Z","avatar_url":"https://github.com/SharonNavarro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Angular Testing Course\n\nThis project demonstrates a comprehensive approach to testing Angular applications while improving code quality and maintaining consistent commit standards.\n\n## Overview\n\nThe **Angular Testing Course** repository showcases best practices for:\n- Unit testing services and components.\n- Integrating Jest as the primary testing framework.\n- Ensuring code quality through linting and formatting tools.\n- Enforcing commit message standards using Git hooks.\n\n---\n\n## Test report\n\nRun `npm run test:coverage`\n- Console\n  \n![image](https://github.com/user-attachments/assets/0f752a43-9de6-4f28-a5f2-710ccd97bdd4)\n\n- HTML report\n\n![image](https://github.com/user-attachments/assets/271cd5d4-ae07-4876-ba3b-4adf487b09c0)\n![image](https://github.com/user-attachments/assets/4e7acdb3-9b0e-4096-8b0a-1e087c8b3451)\n![image](https://github.com/user-attachments/assets/e2be715d-bed8-458a-bcd6-9df63d9b59b7)\n\n---\n\n## Features\n\n### 1. **Testing Framework: Jest**\n- Replaces the default Angular testing setup with [Jest](https://jestjs.io/), a faster and more flexible JavaScript testing framework.\n- Supports features like snapshot testing, powerful mocking, and easy integration with TypeScript.\n\n### 2. **Linting and Formatting**\n- Utilizes [ESLint](https://eslint.org/) for linting.\n- Integrates [Prettier](https://prettier.io/) to ensure consistent code formatting.\n- Adds custom ESLint plugins:\n  - **`eslint-plugin-simple-import-sort`**: Automatically sorts imports.\n  - **`eslint-plugin-unused-imports`**: Identifies and removes unused imports.\n\n### 3. **Commit Standards**\n- Enforces commit message conventions using [Commitlint](https://commitlint.js.org/).\n- Configured with the **Conventional Commits** standard via `@commitlint/config-conventional`.\n- Git hooks are managed with [Husky](https://typicode.github.io/husky/), ensuring linting, formatting, and commit validation before each push.\n\n---\n\n## Setup\n\n### Install Dependencies\n```bash\nnpm install\n```\n\n### Start Development Server\n```bash\nng serve\n```\n\n---\n\n## Scripts\n\n### Testing\n- **Run Unit Tests**:\n  ```bash\n  npm test\n  ```\n- **Run Tests in Watch Mode**:\n  ```bash\n  npm run test:watch\n  ```\n- **Run Tests in CI Mode**:\n  ```bash\n  npm run test:ci\n  ```\n\n### Code Quality\n- **Lint Code**:\n  ```bash\n  npm run lint\n  ```\n- **Format Code**:\n  ```bash\n  npm run format\n  ```\n\n### Husky and Commitlint\n- **Enable Husky**:\n  ```bash\n  npm run enabled-husky\n  ```\n- **Prepare Commit Hooks**:\n  ```bash\n  npm run prepare\n  ```\n\n---\n\n## Testing Libraries\n\n### 1. **Jest**:\n- Fast and efficient testing framework with an Angular preset for seamless integration.\n  - **Packages Installed**:\n    - `jest`\n    - `jest-preset-angular`\n    - `@types/jest`\n\n### 2. **Angular Testing Tools**:\n- Supports unit tests with Angular's testing modules and Karma for legacy compatibility.\n  - **Packages Installed**:\n    - `@angular-devkit/build-angular`\n    - `@angular/cli`\n    - \n---\n\n## Quality and Standards Tools\n\n### 1. **Linting and Formatting**\n- **ESLint**:\n  - Core linter for detecting issues in TypeScript and JavaScript files.\n  - Custom plugins:\n    - `eslint-config-prettier`: Prevents Prettier and ESLint from conflicting.\n    - `eslint-plugin-prettier`: Integrates Prettier rules into ESLint.\n    - `eslint-plugin-simple-import-sort`: Automatically organizes imports.\n    - `eslint-plugin-unused-imports`: Removes unused imports.\n- **Prettier**:\n  - Enforces a consistent code style across the project.\n\n### 2. **Commit Standards**\n- **Husky**:\n  - Configures Git hooks to run linting, formatting, and commit validation tasks.\n- **Commitlint**:\n  - Enforces [Conventional Commits](https://www.conventionalcommits.org/) to maintain clean and readable commit history.\n  - Configuration:\n    - `@commitlint/cli`\n    - `@commitlint/config-conventional`\n- **Lint-staged**:\n  - Runs linting and formatting checks only on staged files before commits.\n\n---\n\n## Resources\n\n- [Angular Testing Guide](https://angular.io/guide/testing)\n- [Jest Documentation](https://jestjs.io/docs/getting-started)\n- [ESLint Documentation](https://eslint.org/docs/latest/user-guide/getting-started)\n- [Prettier Documentation](https://prettier.io/docs/en/)\n- [Commitlint Documentation](https://commitlint.js.org/)\n- [Husky Documentation](https://typicode.github.io/husky/)\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharonnavarro%2Fangular-testing-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharonnavarro%2Fangular-testing-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharonnavarro%2Fangular-testing-course/lists"}