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

推荐订阅源

罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
爱范儿
爱范儿
小众软件
小众软件
MyScale Blog
MyScale Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
V
V2EX
量子位
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
C
Check Point 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 models cli assertions · openclaw/openclaw@4...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -106,6 +106,20 @@ describe("models cli", () => {

106106

return command;

107107

}

108108109+

function expectCommandOptions(

110+

command: ReturnType<typeof vi.fn>,

111+

expected: Record<string, unknown>,

112+

) {

113+

expect(command).toHaveBeenCalledTimes(1);

114+

const options = command.mock.calls[0]?.[0] as Record<string, unknown> | undefined;

115+

const context = command.mock.calls[0]?.[1];

116+

for (const [key, value] of Object.entries(expected)) {

117+

expect(options?.[key]).toEqual(value);

118+

}

119+

expect(typeof context).toBe("object");

120+

expect(context).not.toBeNull();

121+

}

122+109123

it("registers github-copilot login command", async () => {

110124

const program = createProgram();

111125

const models = requireCommand(program, "models");

@@ -118,26 +132,20 @@ describe("models cli", () => {

118132

);

119133120134

expect(modelsAuthLoginCommand).toHaveBeenCalledTimes(1);

121-

expect(modelsAuthLoginCommand).toHaveBeenCalledWith(

122-

expect.objectContaining({

123-

provider: "github-copilot",

124-

method: "device",

125-

yes: true,

126-

agent: "poe",

127-

}),

128-

expect.any(Object),

129-

);

135+

expectCommandOptions(modelsAuthLoginCommand, {

136+

provider: "github-copilot",

137+

method: "device",

138+

yes: true,

139+

agent: "poe",

140+

});

130141

});

131142132143

it.each([

133144

{ label: "status flag", args: ["models", "status", "--agent", "poe"] },

134145

{ label: "parent flag", args: ["models", "--agent", "poe", "status"] },

135146

])("passes --agent to models status ($label)", async ({ args }) => {

136147

await runModelsCommand(args);

137-

expect(modelsStatusCommand).toHaveBeenCalledWith(

138-

expect.objectContaining({ agent: "poe" }),

139-

expect.any(Object),

140-

);

148+

expectCommandOptions(modelsStatusCommand, { agent: "poe" });

141149

});

142150143151

it.each([

@@ -180,16 +188,13 @@ describe("models cli", () => {

180188

])("passes parent --agent to models auth $label", async ({ args, command, expected }) => {

181189

await runModelsCommand(args);

182190183-

expect(command).toHaveBeenCalledWith(expect.objectContaining(expected), expect.any(Object));

191+

expectCommandOptions(command, expected);

184192

});

185193186194

it("passes list-specific --agent and --json to models auth list", async () => {

187195

await runModelsCommand(["models", "auth", "list", "--agent", "poe", "--json"]);

188196189-

expect(modelsAuthListCommand).toHaveBeenCalledWith(

190-

expect.objectContaining({ agent: "poe", json: true }),

191-

expect.any(Object),

192-

);

197+

expectCommandOptions(modelsAuthListCommand, { agent: "poe", json: true });

193198

});

194199195200

it.each([