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

推荐订阅源

雷峰网
雷峰网
爱范儿
爱范儿
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 叶小钗
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
博客园 - 司徒正美
博客园 - 【当耐特】
IT之家
IT之家

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: guard messaging test helpers · openclaw/openclaw@03...
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -491,7 +491,6 @@ function requireReactionCall(

491491

index: number,

492492

) {

493493

const call = mock.mock.calls[index] as unknown[] | undefined;

494-

expect(call).toBeDefined();

495494

if (!call) {

496495

throw new Error(`missing reaction call ${index + 1}`);

497496

}

@@ -564,7 +563,6 @@ function createMockDraftStreamForTest() {

564563
565564

function expectPreviewEditContent(content: string) {

566565

const call = editMessageDiscord.mock.calls[0] as unknown[] | undefined;

567-

expect(call).toBeDefined();

568566

if (!call) {

569567

throw new Error("missing preview edit call");

570568

}

@@ -760,7 +758,6 @@ describe("processDiscordMessage ack reactions", () => {

760758

const resolveCall = discordTargetMocks.resolveDiscordTargetChannelId.mock.calls[0] as

761759

| unknown[]

762760

| undefined;

763-

expect(resolveCall).toBeDefined();

764761

if (!resolveCall) {

765762

throw new Error("missing Discord target resolve call");

766763

}

Original file line numberDiff line numberDiff line change

@@ -74,8 +74,10 @@ function requireArray(value: unknown, label: string): Array<unknown> {

7474

function callArg(mock: unknown, callIndex: number, argIndex: number, label: string) {

7575

const calls = (mock as { mock?: { calls?: Array<Array<unknown>> } }).mock?.calls ?? [];

7676

const call = calls.at(callIndex);

77-

expect(call, label).toBeDefined();

78-

return call?.[argIndex];

77+

if (!call) {

78+

throw new Error(`Expected ${label}`);

79+

}

80+

return call[argIndex];

7981

}

8082
8183

function fetchParams(): Record<string, unknown> {

Original file line numberDiff line numberDiff line change

@@ -16,9 +16,9 @@ function expectTargetFields(

1616

target: unknown,

1717

expected: { kind: string; id: string; normalized?: string },

1818

): void {

19-

expect(target).toBeDefined();

20-

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

21-

expect(target).not.toBeNull();

19+

if (!target || typeof target !== "object") {

20+

throw new Error("Expected target record");

21+

}

2222

const actual = target as Record<string, unknown>;

2323

expect(actual.kind).toBe(expected.kind);

2424

expect(actual.id).toBe(expected.id);

Original file line numberDiff line numberDiff line change

@@ -147,21 +147,29 @@ function expectInvokeResponse(sendActivity: ReturnType<typeof vi.fn>, status?: n

147147

);

148148

})?.[0] as { value?: { status?: unknown } } | undefined;

149149
150-

expect(activity).toBeDefined();

150+

if (!activity) {

151+

throw new Error("Expected invokeResponse activity");

152+

}

151153

if (status !== undefined) {

152-

expect(activity?.value?.status).toBe(status);

154+

expect(activity.value?.status).toBe(status);

153155

}

154156

}

155157
156158

function expectLogFields(logFn: unknown, message: string, fields: Record<string, unknown>): void {

157159

const calls = (logFn as { mock?: { calls?: Array<[unknown, unknown?]> } }).mock?.calls;

158-

expect(calls).toBeDefined();

159-

const call = calls?.find(([text]) => text === message);

160-

expect(call).toBeDefined();

161-

const meta = call?.[1] as Record<string, unknown> | undefined;

162-

expect(meta).toBeDefined();

160+

if (!calls) {

161+

throw new Error("Expected log mock calls");

162+

}

163+

const call = calls.find(([text]) => text === message);

164+

if (!call) {

165+

throw new Error(`Expected log message: ${message}`);

166+

}

167+

const meta = call[1] as Record<string, unknown> | undefined;

168+

if (!meta) {

169+

throw new Error(`Expected log metadata for: ${message}`);

170+

}

163171

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

164-

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

172+

expect(meta[key]).toEqual(value);

165173

}

166174

}

167175
Original file line numberDiff line numberDiff line change

@@ -19,7 +19,9 @@ function sendOptions(call: unknown[] | undefined): {

1919

mediaUrl?: string;

2020

} {

2121

const options = call?.[2];

22-

expect(options).toBeDefined();

22+

if (!options) {

23+

throw new Error("Expected Slack send options");

24+

}

2325

return options as {

2426

blocks?: Array<{

2527

block_id?: string;