fix(test): match getSession URL by suffix, not /getSession path
All checks were successful
CI / check (push) Successful in 13s

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.
This commit is contained in:
Julien Calixte
2026-06-07 22:31:26 +02:00
parent 2105d75cb5
commit 7623fff227

View File

@@ -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,