{"id":18086113,"url":"https://github.com/shashikhanal/unit-and-integration-test","last_synced_at":"2025-04-06T00:43:25.388Z","repository":{"id":258282222,"uuid":"873657343","full_name":"shashikhanal/unit-and-integration-test","owner":"shashikhanal","description":"Getting started with Unit and Integration testing for your Nodejs/Typescript project.","archived":false,"fork":false,"pushed_at":"2024-10-29T21:23:27.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T23:44:20.723Z","etag":null,"topics":["integration-testing","jest","software-testing","supertest","testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shashikhanal.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T14:17:28.000Z","updated_at":"2024-10-29T21:26:31.000Z","dependencies_parsed_at":"2024-12-19T07:42:56.618Z","dependency_job_id":"54860540-22a8-4ac6-b1f2-befdf1500ec3","html_url":"https://github.com/shashikhanal/unit-and-integration-test","commit_stats":null,"previous_names":["shashikhanal/uie-test"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashikhanal%2Funit-and-integration-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashikhanal%2Funit-and-integration-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashikhanal%2Funit-and-integration-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashikhanal%2Funit-and-integration-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shashikhanal","download_url":"https://codeload.github.com/shashikhanal/unit-and-integration-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419815,"owners_count":20936012,"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":["integration-testing","jest","software-testing","supertest","testing","unit-testing"],"created_at":"2024-10-31T16:06:37.047Z","updated_at":"2025-04-06T00:43:25.371Z","avatar_url":"https://github.com/shashikhanal.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unit and Integration Testing\nThis repository serves as a comprehensive introduction for setting up unit and integration tests within Node.js and TypeScript projects. It provides test examples from easy to advanced complexity with pre-configured testing libraries, making it easier for developers/engineers to start writing reliable tests right from the beginning.\n\n## Getting Started\nFollow these instructions to set up and run the tests locally.\n\n### Testing libraries used\n- [Jest](https://jestjs.io/): testing framework for unit and integration tests.\n- [SuperTest](https://www.npmjs.com/package/supertest/): library for testing endpoints.\n\n### Prerequisites\nEnsure you have the following installed on your local machine:\n- [Node.js](https://nodejs.org/)\n- [Nodemon](https://nodemon.io/)\n\n### Installation\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/shashikhanal/unit-and-integration-test.git\n\t```\n\n2. **Navigate to the project directory:**\n\n   ```bash\n   cd unit-and-integration-test\n\t```\n\n3. **Install dependencies:**\n\n   ```bash\n   npm install\n\t```\n\n### Configuration\nYou can customise the test coverage parameters (e.g. branches, statements, etc.) in the `jest.integration.config.ts` and `jest.unit.config.ts` files. The default configuration is set to:\n\n```json\n{\n  branches: 80,\n  functions: 80,\n  lines: 80,\n  statements: 80,\n}\n```\n\n## Running Unit Tests\nOnce the setup is complete, you can run unit tests with:\n\n```bash\nnpm run test:unit\n```\n\n## Running Integration Tests\nOnce the setup is complete, you can run integration tests with:\n\n```bash\nnpm run test:integration\n```\n\n## Contributing\nContributions are welcome! Please follow the standard GitHub workflow:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Commit your changes and push them to your fork.\n4. Open a pull request and describe your changes.\n\n## License\nThis project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). See the LICENSE for details.\n\n## Contact\nFor any inquiries or issues, feel free to open an issue on GitHub or contact the repository owner directly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshashikhanal%2Funit-and-integration-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshashikhanal%2Funit-and-integration-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshashikhanal%2Funit-and-integration-test/lists"}