{"id":15288953,"url":"https://github.com/hodfords-solutions/nestjs-testing","last_synced_at":"2025-07-27T06:36:24.509Z","repository":{"id":257800816,"uuid":"861514198","full_name":"hodfords-solutions/nestjs-testing","owner":"hodfords-solutions","description":"Provides some tools for implementing Unit test in Nestjs","archived":false,"fork":false,"pushed_at":"2025-02-19T07:24:19.000Z","size":132,"stargazers_count":42,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-09T20:02:46.603Z","etag":null,"topics":["nestjs","nodejs","testing"],"latest_commit_sha":null,"homepage":"https://opensource.hodfords.uk/nestjs-testing","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/hodfords-solutions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-09-23T03:39:34.000Z","updated_at":"2025-02-19T07:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9c84a4f-80a0-4aed-846f-4ca108864065","html_url":"https://github.com/hodfords-solutions/nestjs-testing","commit_stats":null,"previous_names":["hodfords-solutions/nestjs-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodfords-solutions%2Fnestjs-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodfords-solutions%2Fnestjs-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodfords-solutions%2Fnestjs-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hodfords-solutions%2Fnestjs-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hodfords-solutions","download_url":"https://codeload.github.com/hodfords-solutions/nestjs-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103865,"owners_count":21048245,"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":["nestjs","nodejs","testing"],"created_at":"2024-09-30T15:54:50.711Z","updated_at":"2025-04-09T20:03:05.081Z","avatar_url":"https://github.com/hodfords-solutions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://opensource.hodfords.uk\" target=\"blank\"\u003e\u003cimg src=\"https://opensource.hodfords.uk/img/logo.svg\" width=\"320\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nNestjs-Testing is a testing library for Nestjs applications. It provides a set of utilities to help you test your Nestjs application.\n\u003c/p\u003e\n\n## Installation 🤖\nTo begin using it, we first install the required dependencies.\n```\nnpm install @hodfords/nestjs-testing\n```\n\n## Configuration 🚀\nTo easily customize the configuration, let's create an object that extends the `BaseTestHelper` class. This object will be used to configure the test environment.\n\n```typescript\nexport class TestHelper extends BaseTestHelper {\n    getSupertestConfig(): SupertestConfig {\n        return {\n            isUseBearerAuth: true,\n            authenticationHeader: 'Authorization'\n        };\n    }\n\n    getTestModuleBuilder(): TestingModuleBuilder {\n        return Test.createTestingModule({\n            imports: [AppModule]\n        });\n    }\n}\n```\n\n## Usage 🚀\n\nWrite your test cases using the `TestHelper` class.\n\n```typescript\ndescribe('AppController (e2e)', () =\u003e {\n    let testHelper = new TestHelper();\n\n    beforeAll(async () =\u003e {\n        await testHelper.initialize();\n    });\n\n    it('Get index success', async () =\u003e {\n        return testHelper.get('/').isOk().expect('Hello World!');\n    });\n});\n```\n\n## License\nThis project is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhodfords-solutions%2Fnestjs-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhodfords-solutions%2Fnestjs-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhodfords-solutions%2Fnestjs-testing/lists"}