Challenge Overview
Challenge Overview
Improve the automated testing on the provided Nest JS based node project.
Project Overview
The project objective is to build an SDK for the Loyalty Payment Card(LPC) for our client. This SDK will be used by LPC’s clients to build the LPC mobile app.
So the SDK will provide all required functionalities from authentication to payment processing, reward management, etc.
This project creates the backend for developer portal.
Assets
Source code is provided on forum.
Technology Stack
Nest JS, Typescript, Unit tests, e2e tests
Individual Requirement
-
Add/Update Unit tests
-
Add/update the unit tests on the provided source code in current configuration
-
Add unit tests on missing class/methods or files
-
Each method should be tested separately(independently) i.e. shouldn’t depend on any other method, db, third party
-
Check the guide here https://docs.nestjs.com/fundamentals/testing#unit-testing
-
-
Add e2e(integration) tests.
-
Add e2e tests
-
Follow the e2e documentation here https://docs.nestjs.com/fundamentals/testing#end-to-end-testing
-
Should mock database and third party(cognito etc)
-
-
Minimum of global 85% of coverage in each category. We expect that all controllers, services will have 100% coverage
-
Do not modify any test configuration without confirmation
Final Submission Guidelines
Please submit the following:
-
Submit the git patch against 35c3358bec0dba01f04fbb2f010fbe8864337344
https://gitlab.com/poseidon-lpc/lpc-codebase/portal/backend/-/tree/feature/enterprise-apis