feat: add more error handling
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user