-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
🚀 Overview
We need to create HTTPYac test files for each of the following entities in our NestJS backend: admin, analytics, blockchain, leaderboard, offline-quiz, quiz, and starknet. These files are intended to help us manually and automatically test our API using the HTTPYac CLI or VS Code plugin.
🎯 Objectives
- Create
.httptest files for each entity under thehttp-tests/folder. - Ensure that each endpoint (GET, POST, PATCH, DELETE) has at least 3 sample HTTP requests per module.
- Include example payloads based on the module’s Controller routes, DTOs, and service logic.
- Use variables for
baseUrland optionally fortoken(auth) where applicable. - Add comments or names to each request for clarity and document the expected results.
📝 Detailed Requirements
-
Setup
- Use npm ci instead of npm install when setting up the project to avoid dependency mismatches.
-
HTTPYac Files
-
Place the test files in the following structure:
http-tests/ admin.http analytics.http blockchain.http leaderboard.http offline-quiz.http quiz.http starknet.http
-
-
Test Content
- For each module, create at least 3 sample HTTP requests covering various operations (GET, POST, PATCH, DELETE) and include:
- An example payload for the request, referencing the DTOs as needed.
- Variables for
baseUrl(and optionallytoken) to ensure reusability of the tests. - Clear comments for each request indicating the purpose or expected result.
- For each module, create at least 3 sample HTTP requests covering various operations (GET, POST, PATCH, DELETE) and include:
⚙️ Technical Considerations
- Familiarize yourself with each module by reviewing its Controller, DTOs, and service logic.
- Ensure that the tests are runnable with HTTPYac (CLI or VS Code plugin).
✅ Acceptance Criteria
- Each entity has a corresponding
.httpfile in thehttp-tests/folder. - At least 3 sample requests per module, each with clear comments and necessary variables.
- Tests are verified to be runnable via HTTPYac.
Let's ensure our API endpoints are thoroughly tested with these HTTPYac files! 🎉