mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Update tests to expect a throw
This commit is contained in:
parent
ce0a488738
commit
23b7e0217f
@ -57,9 +57,7 @@ describe("Pokerogue Session Savedata API", () => {
|
|||||||
it("should return false and report a warning on ERROR", async () => {
|
it("should return false and report a warning on ERROR", async () => {
|
||||||
server.use(http.get(`${apiBase}/savedata/session/newclear`, () => HttpResponse.error()));
|
server.use(http.get(`${apiBase}/savedata/session/newclear`, () => HttpResponse.error()));
|
||||||
|
|
||||||
const success = await sessionSavedataApi.newclear(params);
|
await expect(sessionSavedataApi.newclear(params)).rejects.toThrow("Could not newclear session!");
|
||||||
|
|
||||||
expect(success).toBe(false);
|
|
||||||
expect(console.warn).toHaveBeenCalledWith("Could not newclear session!", expect.any(Error));
|
expect(console.warn).toHaveBeenCalledWith("Could not newclear session!", expect.any(Error));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user