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

推荐订阅源

爱范儿
爱范儿
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
Netflix TechBlog - Medium
GbyAI
GbyAI
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Martin Fowler
Martin Fowler
腾讯CDC
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog

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 onboard search assertions · openclaw/opencl...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -186,6 +186,10 @@ function createPrompter(params: {

186186

return { prompter, notes };

187187

}

188188189+

function mockCalls<T extends unknown[]>(fn: unknown): T[] {

190+

return (fn as { mock: { calls: T[] } }).mock.calls;

191+

}

192+189193

function createPerplexityConfig(apiKey: string, enabled?: boolean): OpenClawConfig {

190194

return {

191195

tools: {

@@ -337,9 +341,10 @@ describe("setupSearch", () => {

337341

expect(pluginWebSearchApiKey(result, entry.pluginId)).toBe(entry.key);

338342

expect(result.plugins?.entries?.[entry.pluginId]?.enabled).toBe(true);

339343

if (entry.textMessage) {

340-

expect(prompter.text).toHaveBeenCalledWith(

341-

expect.objectContaining({ message: entry.textMessage, sensitive: true }),

344+

const textCall = mockCalls<[Record<string, unknown>]>(prompter.text).find(

345+

([options]) => options.message === entry.textMessage,

342346

);

347+

expect(textCall?.[0].sensitive).toBe(true);

343348

}

344349

}

345350

@@ -387,9 +392,7 @@ describe("setupSearch", () => {

387392

expect(result.tools?.web?.search?.provider).toBe("brave");

388393

expect(result.tools?.web?.search?.enabled).toBeUndefined();

389394

const missingNote = notes.find((n) => n.message.includes("No Brave Search API key stored"));

390-

expect(missingNote).toMatchObject({

391-

message: expect.stringContaining("No Brave Search API key stored"),

392-

});

395+

expect(missingNote?.message).toContain("No Brave Search API key stored");

393396

} finally {

394397

if (original === undefined) {

395398

delete process.env.BRAVE_API_KEY;

@@ -494,11 +497,10 @@ describe("setupSearch", () => {

494497

textValue: "",

495498

});

496499

await setupSearch(cfg, runtime, prompter);

497-

expect(prompter.text).toHaveBeenCalledWith(

498-

expect.objectContaining({

499-

message: "Moonshot / Kimi API key",

500-

}),

500+

const textCall = mockCalls<[Record<string, unknown>]>(prompter.text).find(

501+

([options]) => options.message === "Moonshot / Kimi API key",

501502

);

503+

expect(textCall?.[0].message).toBe("Moonshot / Kimi API key");

502504

});

503505504506

it("quickstart skips key prompt when env var is available", async () => {

@@ -662,17 +664,17 @@ describe("setupSearch", () => {

662664

const providers = listSearchProviderOptions();

663665

const values = providers.map((e) => e.id);

664666

expect(values).toEqual([...values].toSorted());

665-

expect(values).toEqual(

666-

expect.arrayContaining([

667-

"brave",

668-

"firecrawl",

669-

"gemini",

670-

"grok",

671-

"kimi",

672-

"minimax",

673-

"perplexity",

674-

"tavily",

675-

]),

676-

);

667+

for (const providerId of [

668+

"brave",

669+

"firecrawl",

670+

"gemini",

671+

"grok",

672+

"kimi",

673+

"minimax",

674+

"perplexity",

675+

"tavily",

676+

]) {

677+

expect(values).toContain(providerId);

678+

}

677679

});

678680

});