This pull request introduces changes across multiple test files to incorporate the use of JWT tokens for authentication in test requests. This adjustment ensures that our tests accurately reflect the application's behavior in scenarios where authentication is required.
Summary
Added a before hook in test/bookCategory.test.js, test/booksByAuthor.test.js, and test/booksSearch.test.js to log in and retrieve a JWT token before running tests.
Modified GET requests in the tests to include the Authorization header, using the retrieved JWT token.
Ensured that all tests now simulate authenticated requests, aligning with the application's real-world use cases.
PR Feedback (click)
Description
This pull request introduces changes across multiple test files to incorporate the use of JWT tokens for authentication in test requests. This adjustment ensures that our tests accurately reflect the application's behavior in scenarios where authentication is required.
Summary
before
hook intest/bookCategory.test.js
,test/booksByAuthor.test.js
, andtest/booksSearch.test.js
to log in and retrieve a JWT token before running tests.Authorization
header, using the retrieved JWT token.test/bookCategory.test.js
,test/booksByAuthor.test.js
,test/booksSearch.test.js
.Fixes #79.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.