Update tests to expect a throw

This commit is contained in:
Sirz Benjie 2025-04-27 14:29:52 -05:00
parent ce0a488738
commit 23b7e0217f
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -57,9 +57,7 @@ describe("Pokerogue Session Savedata API", () => {
it("should return false and report a warning on ERROR", async () => {
server.use(http.get(`${apiBase}/savedata/session/newclear`, () => HttpResponse.error()));
const success = await sessionSavedataApi.newclear(params);
expect(success).toBe(false);
await expect(sessionSavedataApi.newclear(params)).rejects.toThrow("Could not newclear session!");
expect(console.warn).toHaveBeenCalledWith("Could not newclear session!", expect.any(Error));
});
});