fix(test): match getSession URL by suffix, not /getSession path
All checks were successful
CI / check (push) Successful in 13s
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:
@@ -52,7 +52,7 @@ Deno.test(
|
|||||||
`Bearer ${makeJwt({ sub: did })}`,
|
`Bearer ${makeJwt({ sub: did })}`,
|
||||||
);
|
);
|
||||||
assertEquals(result, 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(
|
assertEquals(
|
||||||
sessionCall?.headers.get("Authorization")?.startsWith("Bearer "),
|
sessionCall?.headers.get("Authorization")?.startsWith("Bearer "),
|
||||||
true,
|
true,
|
||||||
|
|||||||
Reference in New Issue
Block a user