2.7 KiB
2.7 KiB
id | title | challengeType | forumTopicId |
---|---|---|---|
587d824a367417b2b2512c43 | Personal Library | 4 | 301571 |
Description
Instructions
Tests
tests:
- text: I can provide my own project, not the example URL.
testString: |
getUserInput => {
assert(!/.*\/personal-library\.freecodecamp\.rocks/.test(getUserInput('url')));
}
- text: I can post a title to /api/books to add a book and returned will be the object with the title and a unique _id.
testString: ''
- text: I can get /api/books to retrieve an array of all books containing title, _id, and commentcount.
testString: ''
- text: I can get /api/books/{id} to retrieve a single object of a book containing _title, _id, & an array of comments (empty array if no comments present).
testString: ''
- text: I can post a comment to /api/books/{id} to add a comment to a book and returned will be the books object similar to get /api/books/{id} including the new comment.
testString: ''
- text: I can delete /api/books/{_id} to delete a book from the collection. Returned will be 'delete successful' if successful.
testString: ''
- text: If I try to request a book that doesn't exist I will be returned 'no book exists'.
testString: ''
- text: I can send a delete request to /api/books to delete all books in the database. Returned will be 'complete delete successful' if successful.
testString: ''
- text: All 6 functional tests required are complete and passing.
testString: ''
Challenge Seed
Solution
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/