Skip to content

Commit 804380c

Browse files
Jason Separovicclaude
andcommitted
test: use real Baileys v7 error shape in 515 restart test
The test was using { output: { statusCode: 515 } } which was already handled before the fix. Updated to use the actual Baileys v7 shape { error: { output: { statusCode: 515 } } } to cover the new fallback path in getStatusCode. Co-Authored-By: Claude Code (Opus 4.6) <[email protected]>
1 parent 7c6cce8 commit 804380c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/web/login-qr.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ describe("login-qr", () => {
5151

5252
it("restarts login once on status 515 and completes", async () => {
5353
waitForWaConnectionMock
54-
.mockRejectedValueOnce({ output: { statusCode: 515 } })
54+
// Baileys v7 wraps the error: { error: BoomError(515) }
55+
.mockRejectedValueOnce({ error: { output: { statusCode: 515 } } })
5556
.mockResolvedValueOnce(undefined);
5657

5758
const start = await startWebLoginWithQr({ timeoutMs: 5000 });

0 commit comments

Comments
 (0)