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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
The Cloudflare Blog
量子位
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
D
DataBreaches.Net
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
U
Unit 42
博客园 - 聂微东
有赞技术团队
有赞技术团队
A
About on SuperTechFans

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: dedupe channels list log mock calls · openclaw/open...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -96,6 +96,14 @@ function createCatalogEntry(id: string, label: string): ChannelPluginCatalogEntr

9696

} as unknown as ChannelPluginCatalogEntry;

9797

}

989899+

function loggedText(runtime: ReturnType<typeof createTestRuntime>): string {

100+

const value = runtime.log.mock.calls.at(0)?.[0];

101+

if (typeof value !== "string") {

102+

throw new Error("expected runtime log text");

103+

}

104+

return value;

105+

}

106+99107

describe("channels list", () => {

100108

beforeEach(() => {

101109

mocks.readConfigFileSnapshot.mockReset();

@@ -118,7 +126,7 @@ describe("channels list", () => {

118126119127

await channelsListCommand({ json: true }, runtime);

120128121-

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] as string) as Record<string, unknown>;

129+

const payload = JSON.parse(loggedText(runtime)) as Record<string, unknown>;

122130

expect(payload.auth).toBeUndefined();

123131

expect(payload).toHaveProperty("chat");

124132

});

@@ -148,7 +156,7 @@ describe("channels list", () => {

148156

expect(mocks.listReadOnlyChannelPluginsForConfig).toHaveBeenCalledWith(config, {

149157

includeSetupFallbackPlugins: true,

150158

});

151-

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] as string) as {

159+

const payload = JSON.parse(loggedText(runtime)) as {

152160

chat?: Record<string, { accounts: string[]; installed: boolean; origin: string }>;

153161

};

154162

expect(payload.chat?.telegram).toEqual({

@@ -167,7 +175,7 @@ describe("channels list", () => {

167175168176

await channelsListCommand({ json: true }, runtime);

169177170-

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] as string) as {

178+

const payload = JSON.parse(loggedText(runtime)) as {

171179

usage?: unknown;

172180

};

173181

expect(payload.usage).toBeUndefined();

@@ -204,7 +212,7 @@ describe("channels list", () => {

204212

expect(mocks.listReadOnlyChannelPluginsForConfig).toHaveBeenCalledWith(config, {

205213

includeSetupFallbackPlugins: true,

206214

});

207-

const output = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

215+

const output = stripAnsi(loggedText(runtime));

208216

expect(output).toContain("Chat channels:");

209217

expect(output).toContain("Telegram default:");

210218

expect(output).toContain("installed");

@@ -227,7 +235,7 @@ describe("channels list", () => {

227235228236

await channelsListCommand({}, runtime);

229237230-

const output = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

238+

const output = stripAnsi(loggedText(runtime));

231239

expect(output).toContain("Chat channels:");

232240

expect(output).not.toContain("QQ Bot");

233241

// Hint user about --all

@@ -248,7 +256,7 @@ describe("channels list", () => {

248256249257

await channelsListCommand({ all: true }, runtime);

250258251-

const output = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

259+

const output = stripAnsi(loggedText(runtime));

252260

expect(output).toContain("QQ Bot");

253261

expect(output).toContain("not installed");

254262

expect(output).toContain("not configured");

@@ -271,14 +279,14 @@ describe("channels list", () => {

271279272280

// Without --all: discord should not appear.

273281

await channelsListCommand({}, runtime);

274-

const noAllOutput = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

282+

const noAllOutput = stripAnsi(loggedText(runtime));

275283

expect(noAllOutput).not.toContain("Discord default:");

276284277285

runtime.log.mockClear();

278286279287

// With --all: discord is rendered with installed + not configured + disabled.

280288

await channelsListCommand({ all: true }, runtime);

281-

const allOutput = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

289+

const allOutput = stripAnsi(loggedText(runtime));

282290

expect(allOutput).toContain("Discord default:");

283291

expect(allOutput).toContain("installed");

284292

expect(allOutput).toContain("not configured");

@@ -311,7 +319,7 @@ describe("channels list", () => {

311319312320

await channelsListCommand({ json: true, all: true }, runtime);

313321314-

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] as string) as {

322+

const payload = JSON.parse(loggedText(runtime)) as {

315323

chat: Record<string, { origin: string; installed: boolean }>;

316324

};

317325

expect(payload.chat.telegram?.origin).toBe("configured");

@@ -344,7 +352,7 @@ describe("channels list", () => {

344352345353

await channelsListCommand({ all: true }, runtime);

346354347-

const output = stripAnsi(runtime.log.mock.calls[0]?.[0] as string);

355+

const output = stripAnsi(loggedText(runtime));

348356

expect(output).toContain("WeCom");

349357

expect(output).toContain("installed");

350358

expect(output).not.toContain("not installed");

@@ -355,7 +363,7 @@ describe("channels list", () => {

355363

// not written a config entry for it).

356364

runtime.log.mockClear();

357365

await channelsListCommand({ json: true, all: true }, runtime);

358-

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] as string) as {

366+

const payload = JSON.parse(loggedText(runtime)) as {

359367

chat: Record<string, { origin: string; installed: boolean }>;

360368

};

361369

expect(payload.chat.wecom?.origin).toBe("available");