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. Specifically, it verifies that the response for a valid author contains the correct keys (title, author, year, category) and does not include any unwanted keys (id, _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, category.
Validates that the response does not contain the keys id or _v.
Aims to improve the reliability of the API by verifying the consistency of the response format for a valid author query.
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. Specifically, it verifies that the response for a valid author contains the correct keys (title
,author
,year
,category
) and does not include any unwanted keys (id
,_v
).Summary
test/booksByAuthor.test.js
to check the JSON structure of the response from the/books/author/:authorName
endpoint.title
,author
,year
,category
.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.