diff --git a/extensions/msteams/src/token.test.ts b/extensions/msteams/src/token.test.ts index a806b7584831..4bddb62514f9 100644 --- a/extensions/msteams/src/token.test.ts +++ b/extensions/msteams/src/token.test.ts @@ -208,11 +208,15 @@ describe("token – federated credentials (managed identity)", () => { useManagedIdentity: false, } as any; const result = resolveMSTeamsCredentials(cfg); - expect(result).toMatchObject({ + expect(result).toEqual({ type: "federated", + appId: "app-id", + tenantId: "tenant-id", certificatePath: "/cert.pem", + certificateThumbprint: undefined, + useManagedIdentity: undefined, + managedIdentityClientId: undefined, }); - expect(result).not.toHaveProperty("useManagedIdentity", true); }); }); @@ -223,7 +227,12 @@ describe("token – backward compatibility", () => { it("defaults to secret when authType is absent", () => { const cfg = { appId: "app-id", appPassword: "pw", tenantId: "tenant-id" } as any; const result = resolveMSTeamsCredentials(cfg); - expect(result).toMatchObject({ type: "secret" }); + expect(result).toEqual({ + type: "secret", + appId: "app-id", + appPassword: "pw", + tenantId: "tenant-id", + }); }); it("explicit authType=secret behaves same as absent", () => {