feat: add more error handling

This commit is contained in:
2024-06-07 23:13:30 -04:00
parent 6fd2cc4feb
commit c35c9b9e09
9 changed files with 71 additions and 66 deletions

View File

@@ -19,12 +19,13 @@ describe('requests the "/search" route', () => {
});
it("query that returns no results", async () => {
const response = await app.request("/search?query=");
const response = await app.request("/search?query=a");
expect(response.json()).resolves.toEqual({
success: false,
success: true,
results: [],
hasNextPage: false,
});
expect(response.status).toBe(200);
});
});