This pull request introduces a new unit test to ensure that the JSON structure returned by the /books/author/:authorName endpoint adheres to the expected format. The test verifies that for a valid author name, the response contains an array of books with the correct keys, and excludes any internal identifiers such as id or _v.
Summary
Added a unit test in test/booksByAuthor.test.js to check the JSON structure of the response from the /books/author/:authorName endpoint.
Ensures that each book object in the response includes the keys title, author, year, and category.
Validates that the response does not contain internal identifiers like id or _v.
The test is designed to improve the reliability of the API by ensuring clients receive data in the expected format.
Fixes #87.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces a new unit test to ensure that the JSON structure returned by the
/books/author/:authorName
endpoint adheres to the expected format. The test verifies that for a valid author name, the response contains an array of books with the correct keys, and excludes any internal identifiers such asid
or_v
.Summary
test/booksByAuthor.test.js
to check the JSON structure of the response from the/books/author/:authorName
endpoint.title
,author
,year
, andcategory
.id
or_v
.Fixes #87.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.