mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-18 21:39:28 +02:00
dddd
This commit is contained in:
parent
4b1979edf7
commit
ea63a9e41b
@ -37,13 +37,15 @@ describe("Test misc", () => {
|
|||||||
|
|
||||||
it.skip("test apifetch mock async", async () => {
|
it.skip("test apifetch mock async", async () => {
|
||||||
const spy = vi.fn();
|
const spy = vi.fn();
|
||||||
await apiFetch("https://localhost:8080/account/info").then(response => {
|
await apiFetch("https://localhost:8080/account/info")
|
||||||
|
.then(response => {
|
||||||
expect(response.status).toBe(200);
|
expect(response.status).toBe(200);
|
||||||
expect(response.ok).toBe(true);
|
expect(response.ok).toBe(true);
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then(data => {
|
})
|
||||||
|
.then(data => {
|
||||||
spy(); // Call the spy function
|
spy(); // Call the spy function
|
||||||
expect(data).toEqual({ "username": "greenlamp", "lastSessionSlot": 0 });
|
expect(data).toEqual({ username: "greenlamp", lastSessionSlot: 0 });
|
||||||
});
|
});
|
||||||
expect(spy).toHaveBeenCalled();
|
expect(spy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user