This pull request introduces a new unit test to the booksByAuthor.test.js file to ensure that the /books/author/:authorName endpoint handles invalid author names gracefully. The test checks that the endpoint either returns a 200 status code with an empty array or a 400 status code when provided with an invalid author name.
Summary
Added a unit test to test/booksByAuthor.test.js to verify the handling of invalid author names.
The test sends a request with an invalid author name and expects a 200 or 400 status code in response.
If a 200 status code is received, the response body is expected to be an empty array.
This ensures that the endpoint is robust against invalid input and provides clear feedback to the client.
Fixes #83.
π 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 the
booksByAuthor.test.js
file to ensure that the/books/author/:authorName
endpoint handles invalid author names gracefully. The test checks that the endpoint either returns a 200 status code with an empty array or a 400 status code when provided with an invalid author name.Summary
test/booksByAuthor.test.js
to verify the handling of invalid author names.Fixes #83.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.