https://github.com/el634dev/chai-testing-challenges
https://github.com/el634dev/chai-testing-challenges
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/el634dev/chai-testing-challenges
- Owner: el634dev
- Created: 2024-04-19T15:54:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T17:54:34.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T10:30:24.526Z (over 1 year ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Testing Challenges
Clone this repository, then run `npm install` to install all necessary packages and dependencies.
Completed all TODOs in `src/routes/message.js` and `src/test/message.js`. Then, ran tests to ensure that they pass.
## Endpoints:
#### Messages (TODOs)
| Route | Method | Description |
| ----------- | ----------- | ----------- |
|http://localhost:3000/messages |GET | Gets all messagess |
|http://localhost:3000/messages/{messageId} |GET | Get one message by id|
|http://localhost:3000/messages | POST | add a new message |
|http://localhost:3000/messages/{messageId}| PUT | update an exisiting message|
|http://localhost:3000/messages/{messageId} | DELETE | delete a message |
{messageId} = Route parameter = `:messageId`
#### Users
| Route | Method | Description |
| ----------- | ----------- | ----------- |
|http://localhost:3000/users/ | GET | get all users |
|http://localhost:3000/users/{userId} |GET | Get one user by id|
|http://localhost:3000/users | POST | add a new user to the database |
|http://localhost:3000/users/{userId}| PUT | update an exisiting user|
|http://localhost:3000/users/{userId} | DELETE | delete a user |
{userId} = Route parameter = `:userId`