惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - Franky
I
InfoQ
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
博客园 - 聂微东
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
D
Docker

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten msteams sdk assertions · openclaw/openclaw@...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -146,6 +146,14 @@ function createSdkStub(): MSTeamsTeamsSdk {

146146

};

147147

}

148148149+

function requireFirstAppInstance(appInstances: Record<string, unknown>[]) {

150+

const appInstance = appInstances[0];

151+

if (!appInstance) {

152+

throw new Error("expected sdk.App constructor call");

153+

}

154+

return appInstance;

155+

}

156+149157

describe("createMSTeamsApp", () => {

150158

it("creates app without the Express 5 wildcard route regression (#55161)", async () => {

151159

// Regression test for: https://github.com/openclaw/openclaw/issues/55161

@@ -199,15 +207,16 @@ describe("createMSTeamsAdapter", () => {

199207

},

200208

);

201209202-

expect(fetchMock).toHaveBeenCalledWith(

210+

expect(fetchMock).toHaveBeenCalledTimes(1);

211+

const [url, options] = fetchMock.mock.calls[0] as unknown as [

212+

string,

213+

{ method?: string; headers?: { Authorization?: string } },

214+

];

215+

expect(url).toBe(

203216

"https://example.com/v3/conversations/19%3Aconversation%40thread.tacv2/activities/activity-123",

204-

expect.objectContaining({

205-

method: "DELETE",

206-

headers: expect.objectContaining({

207-

Authorization: "Bearer bot-token",

208-

}),

209-

}),

210217

);

218+

expect(options.method).toBe("DELETE");

219+

expect(options.headers?.Authorization).toBe("Bearer bot-token");

211220

});

212221213222

it("passes the OpenClaw User-Agent to the Bot Framework connector client", async () => {

@@ -238,14 +247,10 @@ describe("createMSTeamsAdapter", () => {

238247

);

239248240249

expect(clientConstructorState.calls).toHaveLength(1);

241-

expect(clientConstructorState.calls[0]).toMatchObject({

242-

serviceUrl: "https://service.example.com/",

243-

options: {

244-

headers: {

245-

"User-Agent": expect.stringMatching(/^teams\.ts\[apps\]\/.+ OpenClaw\/.+$/),

246-

},

247-

},

248-

});

250+

const clientCall = clientConstructorState.calls[0];

251+

expect(clientCall?.serviceUrl).toBe("https://service.example.com/");

252+

const options = clientCall?.options as { headers?: { "User-Agent"?: string } } | undefined;

253+

expect(options?.headers?.["User-Agent"]).toMatch(/^teams\.ts\[apps\]\/.+ OpenClaw\/.+$/);

249254

});

250255

});

251256

@@ -442,11 +447,10 @@ describe("createMSTeamsApp – secret credentials", () => {

442447

};

443448

const app = await createMSTeamsApp(creds, sdk);

444449

expect(app).toBeInstanceOf(FakeApp);

445-

expect(appInstances[0]).toMatchObject({

446-

clientId: "my-app-id",

447-

clientSecret: "my-secret",

448-

tenantId: "my-tenant",

449-

});

450+

const appInstance = requireFirstAppInstance(appInstances);

451+

expect(appInstance.clientId).toBe("my-app-id");

452+

expect(appInstance.clientSecret).toBe("my-secret");

453+

expect(appInstance.tenantId).toBe("my-tenant");

450454

});

451455

});

452456

@@ -468,11 +472,10 @@ describe("createMSTeamsApp – federated certificate credentials", () => {

468472

};

469473

await createMSTeamsApp(creds, sdk);

470474

expect(fs.readFileSync).toHaveBeenCalledWith("/certs/bot.pem", "utf-8");

471-

expect(appInstances[0]).toMatchObject({

472-

clientId: "fed-app-id",

473-

tenantId: "fed-tenant",

474-

});

475-

const tokenProvider = appInstances[0].token as ((scope: string) => Promise<string>) | undefined;

475+

const appInstance = requireFirstAppInstance(appInstances);

476+

expect(appInstance.clientId).toBe("fed-app-id");

477+

expect(appInstance.tenantId).toBe("fed-tenant");

478+

const tokenProvider = appInstance.token as ((scope: string) => Promise<string>) | undefined;

476479

if (!tokenProvider) {

477480

throw new Error("expected federated app to expose token provider");

478481

}

@@ -520,8 +523,10 @@ describe("createMSTeamsApp – federated managed identity", () => {

520523

managedIdentityClientId: "mi-client-id",

521524

};

522525

await createMSTeamsApp(creds, sdk);

523-

expect(appInstances[0]).toMatchObject({ clientId: "mi-app-id", tenantId: "mi-tenant" });

524-

const tokenProvider = appInstances[0].token as ((scope: string) => Promise<string>) | undefined;

526+

const appInstance = requireFirstAppInstance(appInstances);

527+

expect(appInstance.clientId).toBe("mi-app-id");

528+

expect(appInstance.tenantId).toBe("mi-tenant");

529+

const tokenProvider = appInstance.token as ((scope: string) => Promise<string>) | undefined;

525530

if (!tokenProvider) {

526531

throw new Error("expected managed-identity app to expose token provider");

527532

}

@@ -608,9 +613,9 @@ describe("createMSTeamsAdapter – continueConversation", () => {

608613

});

609614610615

expect(createFn).toHaveBeenCalledTimes(1);

611-

expect(createFn).toHaveBeenCalledWith(

612-

expect.objectContaining({ type: "message", text: "hello from proactive send" }),

613-

);

616+

const activity = createFn.mock.calls[0]?.[0] as { type?: string; text?: string } | undefined;

617+

expect(activity?.type).toBe("message");

618+

expect(activity?.text).toBe("hello from proactive send");

614619

});

615620616621

it("provides deleteActivity via REST DELETE in logic callback", async () => {