From 7623fff227d704b10764cbec07c11a3ed0e050fd Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 7 Jun 2026 22:31:26 +0200 Subject: [PATCH] fix(test): match getSession URL by suffix, not /getSession path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PDS endpoint URL is /xrpc/com.atproto.server.getSession — those are dots before getSession, not slashes, so the previous includes("/getSession") filter never matched and the Authorization header assertion silently short-circuited via optional chaining. --- tests/auth_verify_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auth_verify_test.ts b/tests/auth_verify_test.ts index 67b83eb..9aef90e 100644 --- a/tests/auth_verify_test.ts +++ b/tests/auth_verify_test.ts @@ -52,7 +52,7 @@ Deno.test( `Bearer ${makeJwt({ sub: did })}`, ); assertEquals(result, did); - const sessionCall = stub.calls.find((c) => c.url.includes("/getSession")); + const sessionCall = stub.calls.find((c) => c.url.endsWith("getSession")); assertEquals( sessionCall?.headers.get("Authorization")?.startsWith("Bearer "), true,