inspector/clients/web/src/utils/pendingReauth.test.ts
2026-07-02 16:35:31 -07:00

18 lines
544 B
TypeScript

import { describe, it, expect } from "vitest";
import type { PendingReauth } from "./pendingReauth.js";
describe("PendingReauth", () => {
it("carries step-up source through deferred resume", () => {
const pending: PendingReauth = {
serverId: "srv-1",
challenge: {
reason: "insufficient_scope",
requiredScopes: ["weather:read"],
},
authorizationUrl: new URL("https://as.example/authorize"),
authKind: "step_up",
source: "tool",
};
expect(pending.source).toBe("tool");
});
});