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

推荐订阅源

雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
D
Docker
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
U
Unit 42

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 claude doctor note mock calls · openclaw/ope...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -31,6 +31,30 @@ async function withTempHome<T>(

3131

}

3232

}

333334+

function noteArg(noteFn: ReturnType<typeof vi.fn>, argIndex: number): unknown {

35+

const call = noteFn.mock.calls.at(0);

36+

if (!call) {

37+

throw new Error("Expected note call");

38+

}

39+

return call.at(argIndex);

40+

}

41+42+

function noteBody(noteFn: ReturnType<typeof vi.fn>): string {

43+

const value = noteArg(noteFn, 0);

44+

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

45+

throw new Error("Expected note body");

46+

}

47+

return value;

48+

}

49+50+

function noteTitle(noteFn: ReturnType<typeof vi.fn>): string {

51+

const value = noteArg(noteFn, 1);

52+

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

53+

throw new Error("Expected note title");

54+

}

55+

return value;

56+

}

57+3458

describe("resolveClaudeCliProjectDirForWorkspace", () => {

3559

it("matches Claude's sanitized workspace project dir shape", () => {

3660

expect(

@@ -98,8 +122,8 @@ describe("noteClaudeCliHealth", () => {

98122

);

99123100124

expect(noteFn).toHaveBeenCalledTimes(1);

101-

expect(noteFn.mock.calls[0]?.[1]).toBe("Claude CLI");

102-

const body = String(noteFn.mock.calls[0]?.[0]);

125+

expect(noteTitle(noteFn)).toBe("Claude CLI");

126+

const body = noteBody(noteFn);

103127

expect(body).toContain("Binary: /opt/homebrew/bin/claude.");

104128

expect(body).toContain("Headless Claude auth: OK (oauth).");

105129

expect(body).toContain(

@@ -170,7 +194,7 @@ describe("noteClaudeCliHealth", () => {

170194

);

171195172196

expect(noteFn).toHaveBeenCalledTimes(1);

173-

const body = String(noteFn.mock.calls[0]?.[0]);

197+

const body = noteBody(noteFn);

174198

expect(body).toContain(`Agent xiaoao workspace: ${claudeWorkspace} (writable).`);

175199

expect(body).toContain(`Agent xiaoao Claude project dir: ${projectDir} (present).`);

176200

expect(body).not.toContain(defaultWorkspace);

@@ -201,7 +225,7 @@ describe("noteClaudeCliHealth", () => {

201225

},

202226

);

203227204-

const body = String(noteFn.mock.calls[0]?.[0]);

228+

const body = noteBody(noteFn);

205229

expect(body).toContain("Headless Claude auth: OK (oauth).");

206230

expect(body).toContain(`OpenClaw auth profile: missing (${CLAUDE_CLI_PROFILE_ID})`);

207231

expect(body).toContain(

@@ -234,7 +258,7 @@ describe("noteClaudeCliHealth", () => {

234258

},

235259

);

236260237-

const body = String(noteFn.mock.calls[0]?.[0]);

261+

const body = noteBody(noteFn);

238262

expect(body).toContain('Binary: command "claude" was not found on PATH.');

239263

expect(body).toContain("Headless Claude auth: unavailable without interactive prompting.");

240264

expect(body).toContain("claude auth login");