|
9 | 9 | type MSTeamsSsoFetch, |
10 | 10 | handleSigninTokenExchangeInvoke, |
11 | 11 | handleSigninVerifyStateInvoke, |
12 | | - parseSigninTokenExchangeValue, |
13 | | - parseSigninVerifyStateValue, |
14 | 12 | } from "./sso.js"; |
15 | 13 |
|
16 | 14 | function createMemorySsoTokenStore(): MSTeamsSsoTokenStore { |
@@ -68,29 +66,6 @@ function createFakeFetch(handlers: Array<(url: string, init?: unknown) => unknow |
68 | 66 | return { fetchImpl, calls }; |
69 | 67 | } |
70 | 68 |
|
71 | | -describe("msteams signin invoke value parsers", () => { |
72 | | - it("parses signin/tokenExchange values", () => { |
73 | | - expect( |
74 | | - parseSigninTokenExchangeValue({ |
75 | | - id: "flow-1", |
76 | | - connectionName: "Graph", |
77 | | - token: "eyJ...", |
78 | | - }), |
79 | | - ).toEqual({ id: "flow-1", connectionName: "Graph", token: "eyJ..." }); |
80 | | - }); |
81 | | - |
82 | | - it("rejects non-object signin/tokenExchange values", () => { |
83 | | - expect(parseSigninTokenExchangeValue(null)).toBeNull(); |
84 | | - expect(parseSigninTokenExchangeValue("nope")).toBeNull(); |
85 | | - }); |
86 | | - |
87 | | - it("parses signin/verifyState values", () => { |
88 | | - expect(parseSigninVerifyStateValue({ state: "123456" })).toEqual({ state: "123456" }); |
89 | | - expect(parseSigninVerifyStateValue({})).toEqual({ state: undefined }); |
90 | | - expect(parseSigninVerifyStateValue(null)).toBeNull(); |
91 | | - }); |
92 | | -}); |
93 | | - |
94 | 69 | describe("handleSigninTokenExchangeInvoke", () => { |
95 | 70 | it("exchanges the Teams token and persists the result", async () => { |
96 | 71 | const { fetchImpl, calls } = createFakeFetch([ |
|
0 commit comments