mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 16:32:29 +00:00
style(format): fix msteams test drift
This commit is contained in:
@@ -55,11 +55,13 @@ describe("msteams graph helpers", () => {
|
||||
});
|
||||
}) as typeof fetch;
|
||||
|
||||
await expect(fetchGraphJson<{ value: Array<{ id: string }> }>({
|
||||
token: "graph-token",
|
||||
path: "/groups?$select=id",
|
||||
headers: { ConsistencyLevel: "eventual" },
|
||||
})).resolves.toEqual({ value: [{ id: "group-1" }] });
|
||||
await expect(
|
||||
fetchGraphJson<{ value: Array<{ id: string }> }>({
|
||||
token: "graph-token",
|
||||
path: "/groups?$select=id",
|
||||
headers: { ConsistencyLevel: "eventual" },
|
||||
}),
|
||||
).resolves.toEqual({ value: [{ id: "group-1" }] });
|
||||
|
||||
expect(globalThis.fetch).toHaveBeenCalledWith(
|
||||
"https://graph.microsoft.com/v1.0/groups?$select=id",
|
||||
@@ -108,7 +110,9 @@ describe("msteams graph helpers", () => {
|
||||
|
||||
it("fails when credentials or access tokens are unavailable", async () => {
|
||||
resolveMSTeamsCredentialsMock.mockReturnValue(undefined);
|
||||
await expect(resolveGraphToken({ channels: {} })).rejects.toThrow("MS Teams credentials missing");
|
||||
await expect(resolveGraphToken({ channels: {} })).rejects.toThrow(
|
||||
"MS Teams credentials missing",
|
||||
);
|
||||
|
||||
const getAccessToken = vi.fn(async () => ({ token: null }));
|
||||
loadMSTeamsSdkWithAuthMock.mockResolvedValue({
|
||||
|
||||
@@ -58,6 +58,8 @@ describe("createMSTeamsPollStoreMemory", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
await expect(store.recordVote({ pollId: "missing", voterId: "nobody", selections: ["x"] })).resolves.toBeNull();
|
||||
await expect(
|
||||
store.recordVote({ pollId: "missing", voterId: "nobody", selections: ["x"] }),
|
||||
).resolves.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user