chore: Fix types in tests 27/N.

This commit is contained in:
cpojer
2026-02-17 14:31:55 +09:00
parent 4235435309
commit 97c8f4999e
15 changed files with 129 additions and 51 deletions

View File

@@ -37,7 +37,9 @@ describe("web login", () => {
});
it("loginWeb waits for connection and closes", async () => {
const sock = await createWaSocket();
const sock = await (
createWaSocket as unknown as () => Promise<{ ws: { close: () => void } }>
)();
const close = vi.spyOn(sock.ws, "close");
const waiter: typeof waitForWaConnection = vi.fn().mockResolvedValue(undefined);
await loginWeb(false, waiter);