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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
B
Blog
腾讯CDC
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
L
LangChain Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS 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: guard discord preflight mock calls · openclaw/openc...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -99,6 +99,16 @@ function expectPreflightResult(

9999

return result;

100100

}

101101102+

type MockWithCalls = { mock: { calls: unknown[][] } };

103+104+

function firstMockArg(mock: MockWithCalls, label: string) {

105+

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

106+

if (!call) {

107+

throw new Error(`expected ${label} call`);

108+

}

109+

return call[0];

110+

}

111+102112

function createThreadClient(params: { threadId: string; parentId: string }): DiscordClient {

103113

return {

104114

fetchChannel: async (channelId: string) => {

@@ -527,7 +537,7 @@ describe("preflightDiscordMessage", () => {

527537

});

528538529539

expect(transcribeFirstAudioMock).toHaveBeenCalledTimes(1);

530-

const dmAudioCall = transcribeFirstAudioMock.mock.calls[0]?.[0] as

540+

const dmAudioCall = firstMockArg(transcribeFirstAudioMock, "transcribeFirstAudio") as

531541

| { ctx?: { MediaUrls?: unknown; MediaTypes?: unknown } }

532542

| undefined;

533543

expect(dmAudioCall?.ctx?.MediaUrls).toEqual([

@@ -615,7 +625,13 @@ describe("preflightDiscordMessage", () => {

615625

});

616626617627

expect(resolveDiscordDmCommandAccessMock).toHaveBeenCalledTimes(1);

618-

expect(resolveDiscordDmCommandAccessMock.mock.calls[0]?.[0]?.accountId).toBe("default");

628+

expect(

629+

(

630+

firstMockArg(resolveDiscordDmCommandAccessMock, "resolveDiscordDmCommandAccess") as

631+

| { accountId?: unknown }

632+

| undefined

633+

)?.accountId,

634+

).toBe("default");

619635

});

620636621637

it("keeps bound-thread regular bot messages flowing when allowBots=true", async () => {

@@ -772,9 +788,10 @@ describe("preflightDiscordMessage", () => {

772788

});

773789774790

expect(fetchPluralKitMessageInfoMock).toHaveBeenCalledTimes(1);

775-

const pluralKitCall = fetchPluralKitMessageInfoMock.mock.calls[0]?.[0] as

776-

| { messageId?: unknown; config?: { enabled?: unknown } }

777-

| undefined;

791+

const pluralKitCall = firstMockArg(

792+

fetchPluralKitMessageInfoMock,

793+

"fetchPluralKitMessageInfo",

794+

) as { messageId?: unknown; config?: { enabled?: unknown } } | undefined;

778795

expect(pluralKitCall?.messageId).toBe("proxy-456");

779796

expect(pluralKitCall?.config?.enabled).toBe(true);

780797

const preflight = expectPreflightResult(result);

@@ -1484,7 +1501,7 @@ describe("preflightDiscordMessage", () => {

14841501

});

1485150214861503

expect(transcribeFirstAudioMock).toHaveBeenCalledTimes(1);

1487-

const guildAudioCall = transcribeFirstAudioMock.mock.calls[0]?.[0] as

1504+

const guildAudioCall = firstMockArg(transcribeFirstAudioMock, "transcribeFirstAudio") as

14881505

| { ctx?: { MediaUrls?: unknown; MediaTypes?: unknown } }

14891506

| undefined;

14901507

expect(guildAudioCall?.ctx?.MediaUrls).toEqual([