docs: add e2e testing documentation
This commit is contained in:
@@ -95,6 +95,23 @@ $ pnpm run test:e2e
|
||||
$ pnpm run test:cov
|
||||
```
|
||||
|
||||
### End-to-End (E2E) Tests
|
||||
|
||||
The project includes comprehensive end-to-end tests to ensure API endpoints work correctly. These tests are located in the `test` directory:
|
||||
|
||||
- `app.e2e-spec.ts`: Tests the basic API endpoint (/api)
|
||||
- `auth.e2e-spec.ts`: Tests authentication endpoints including:
|
||||
- User profile retrieval
|
||||
- Token refresh
|
||||
- GitHub OAuth redirection
|
||||
- `test-utils.ts`: Utility functions for testing including:
|
||||
- Creating test applications
|
||||
- Creating test users
|
||||
- Generating authentication tokens
|
||||
- Cleaning up test data
|
||||
|
||||
The e2e tests use a real database connection and create/delete test data automatically, ensuring a clean test environment for each test run.
|
||||
|
||||
## Deployment
|
||||
|
||||
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
|
||||
|
||||
Reference in New Issue
Block a user