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

推荐订阅源

V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
Y
Y Combinator Blog
The Cloudflare Blog
V
V2EX
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
P
Privacy International News Feed
S
Securelist
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tor Project blog
P
Proofpoint News Feed
Project Zero
Project Zero
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
美团技术团队
The GitHub Blog
The GitHub Blog
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Latest
Security Latest
NISL@THU
NISL@THU
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Secure Thoughts
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
IT之家
IT之家
Last Week in AI
Last Week in AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy & Cybersecurity Law Blog
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
Spread Privacy
Spread Privacy
S
Schneier on Security
L
Lohrmann on Cybersecurity
S
Security Affairs
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
云风的 BLOG
云风的 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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test: guard extension channel mock calls · openclaw/openclaw@2ec1a27
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -431,7 +431,7 @@ describe("CodexAppServerEventProjector", () => {

431431

},

432432

}),

433433

);

434-

const toolProgressText = onToolResult.mock.calls[0]?.[0]?.text;

434+

const toolProgressText = onToolResult.mock.calls.at(0)?.[0]?.text;

435435

expect(toolProgressText).toBe("🛠️ `run tests (workspace)`");

436436
437437

await projector.handleNotification(

@@ -452,7 +452,6 @@ describe("CodexAppServerEventProjector", () => {

452452

expect(result.lastAssistant).toBeUndefined();

453453

});

454454
455-
456455

it("does not fail a completed reply after a retryable app-server error notification", async () => {

457456

const projector = await createProjector();

458457

@@ -1458,7 +1457,7 @@ describe("CodexAppServerEventProjector", () => {

14581457

}),

14591458

);

14601459
1461-

const text = onToolResult.mock.calls[0]?.[0]?.text;

1460+

const text = onToolResult.mock.calls.at(0)?.[0]?.text;

14621461

expect(text).toContain("sk-123…ZZZZ");

14631462

expect(text).not.toContain("sk-1234567890abcdefZZZZ");

14641463

});

@@ -1590,7 +1589,7 @@ describe("CodexAppServerEventProjector", () => {

15901589

);

15911590
15921591

expect(onToolResult).toHaveBeenCalledTimes(21);

1593-

expect(onToolResult.mock.calls[19]?.[0]?.text).toContain("...(truncated)...");

1592+

expect(onToolResult.mock.calls.at(19)?.[0]?.text).toContain("...(truncated)...");

15941593

expect(JSON.stringify(onToolResult.mock.calls)).not.toContain(

15951594

"final output should not duplicate",

15961595

);

Original file line numberDiff line numberDiff line change

@@ -128,7 +128,7 @@ describe("PlaywrightDiffScreenshotter", () => {

128128

expect(launchMock).toHaveBeenCalledTimes(1);

129129

expect(pages).toHaveLength(1);

130130

expect(pages[0]?.pdf).toHaveBeenCalledTimes(1);

131-

const pdfCall = pages[0]?.pdf.mock.calls[0]?.[0] as Record<string, unknown> | undefined;

131+

const pdfCall = pages[0]?.pdf.mock.calls.at(0)?.[0] as Record<string, unknown> | undefined;

132132

if (!pdfCall) {

133133

throw new Error("expected PDF render call");

134134

}

@@ -404,8 +404,8 @@ describe("diffs plugin registration", () => {

404404

registerDiffsPlugin(api as unknown as OpenClawPluginApi);

405405
406406

expect(on).toHaveBeenCalledTimes(1);

407-

expect(on.mock.calls[0]?.[0]).toBe("before_prompt_build");

408-

const beforePromptBuild = on.mock.calls[0]?.[1];

407+

expect(on.mock.calls.at(0)?.[0]).toBe("before_prompt_build");

408+

const beforePromptBuild = on.mock.calls.at(0)?.[1];

409409

const promptResult = await beforePromptBuild?.({}, {});

410410

expect(promptResult?.prependSystemContext).toBe(

411411

[

Original file line numberDiff line numberDiff line change

@@ -82,7 +82,7 @@ describe("Feishu bot menu handler", () => {

8282

await onBotMenu(createBotMenuEvent({ eventKey: "quick-actions", timestamp: "1700000000000" }));

8383
8484

expect(sendCardFeishuMock).toHaveBeenCalledTimes(1);

85-

const sendArgs = sendCardFeishuMock.mock.calls[0]?.[0] as

85+

const sendArgs = sendCardFeishuMock.mock.calls.at(0)?.[0] as

8686

| {

8787

accountId?: string;

8888

card?: {

@@ -131,7 +131,7 @@ describe("Feishu bot menu handler", () => {

131131

await onBotMenu(createBotMenuEvent({ eventKey: "custom-key", timestamp: "1700000000002" }));

132132
133133

expect(handleFeishuMessageMock).toHaveBeenCalledTimes(1);

134-

const handleArgs = handleFeishuMessageMock.mock.calls[0]?.[0] as

134+

const handleArgs = handleFeishuMessageMock.mock.calls.at(0)?.[0] as

135135

| { event?: { message?: { content?: string } } }

136136

| undefined;

137137

expect(handleArgs?.event?.message?.content).toBe('{"text":"/menu custom-key"}');

@@ -147,7 +147,7 @@ describe("Feishu bot menu handler", () => {

147147

await vi.waitFor(() => {

148148

expect(handleFeishuMessageMock).toHaveBeenCalledTimes(1);

149149

});

150-

const handleArgs = handleFeishuMessageMock.mock.calls[0]?.[0] as

150+

const handleArgs = handleFeishuMessageMock.mock.calls.at(0)?.[0] as

151151

| { event?: { message?: { content?: string } } }

152152

| undefined;

153153

expect(handleArgs?.event?.message?.content).toBe('{"text":"/menu quick-actions"}');

Original file line numberDiff line numberDiff line change

@@ -199,7 +199,7 @@ async function setupDebounceMonitor(params?: {

199199

}

200200
201201

function getFirstDispatchedEvent(): FeishuMessageEvent {

202-

const firstCall = handleFeishuMessageMock.mock.calls[0];

202+

const firstCall = handleFeishuMessageMock.mock.calls.at(0);

203203

if (!firstCall) {

204204

throw new Error("missing dispatch call");

205205

}

@@ -576,7 +576,7 @@ describe("Feishu inbound debounce regressions", () => {

576576

await vi.advanceTimersByTimeAsync(25);

577577
578578

expect(handleFeishuMessageMock).toHaveBeenCalledTimes(1);

579-

const firstParams = handleFeishuMessageMock.mock.calls[0]?.[0] as

579+

const firstParams = handleFeishuMessageMock.mock.calls.at(0)?.[0] as

580580

| { botName?: string }

581581

| undefined;

582582

expect(firstParams?.botName).toBe("OpenClaw Bot");

@@ -680,7 +680,7 @@ describe("Feishu inbound debounce regressions", () => {

680680

const combined = JSON.parse(dispatched.message.content) as { text?: string };

681681

expect(combined.text).toBe("fresh");

682682

expect(recordSpy).toHaveBeenCalledTimes(1);

683-

const [recordedMessageId, recordedNamespace, recordedLogger] = recordSpy.mock.calls[0] ?? [];

683+

const [recordedMessageId, recordedNamespace, recordedLogger] = recordSpy.mock.calls.at(0) ?? [];

684684

expect(recordedMessageId).toBe("om_old_latest_fresh");

685685

expect(recordedNamespace).toBe("default");

686686

expect(typeof recordedLogger).toBe("function");

Original file line numberDiff line numberDiff line change

@@ -52,7 +52,7 @@ describe("gradium speech provider", () => {

5252

});

5353
5454

expect(fetchMock).toHaveBeenCalledOnce();

55-

const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];

55+

const [url, init] = fetchMock.mock.calls.at(0) as [string, RequestInit];

5656

expect(url).toBe("https://api.gradium.ai/api/post/speech/tts");

5757

const headers = new Headers(init.headers);

5858

expect(headers.get("x-api-key")).toBe("gsk_test123");

@@ -82,7 +82,7 @@ describe("gradium speech provider", () => {

8282

timeoutMs: 30_000,

8383

});

8484
85-

const [, init] = fetchMock.mock.calls[0] as [string, RequestInit];

85+

const [, init] = fetchMock.mock.calls.at(0) as [string, RequestInit];

8686

expect(JSON.parse(init.body as string).output_format).toBe("opus");

8787

expect(result.outputFormat).toBe("opus");

8888

expect(result.fileExtension).toBe(".opus");

@@ -107,7 +107,7 @@ describe("gradium speech provider", () => {

107107

timeoutMs: 30_000,

108108

});

109109
110-

const [, init] = fetchMock.mock.calls[0] as [string, RequestInit];

110+

const [, init] = fetchMock.mock.calls.at(0) as [string, RequestInit];

111111

expect(JSON.parse(init.body as string)).toEqual({

112112

text: "Telephony test",

113113

voice_id: "override-voice",

Original file line numberDiff line numberDiff line change

@@ -235,7 +235,7 @@ async function expectSignedRawBodyWins(params: { rawBody: string | Buffer; signe

235235

expect(res.status).toHaveBeenCalledWith(200);

236236

expect(onEvents).toHaveBeenCalledTimes(1);

237237

const processedBody = (

238-

onEvents.mock.calls[0] as unknown as [{ events?: Array<{ source?: { userId?: string } }> }]

238+

onEvents.mock.calls.at(0) as unknown as [{ events?: Array<{ source?: { userId?: string } }> }]

239239

)?.[0];

240240

expect(processedBody?.events?.[0]?.source?.userId).toBe(params.signedUserId);

241241

expect(processedBody?.events?.[0]?.source?.userId).not.toBe("tampered-user");

@@ -414,7 +414,7 @@ describe("createLineNodeWebhookHandler", () => {

414414
415415

expect(res.statusCode).toBe(200);

416416

expect(bot.handleWebhook).toHaveBeenCalledTimes(1);

417-

const [payload] = bot.handleWebhook.mock.calls[0] as unknown as [ParsedLineWebhookPayload];

417+

const [payload] = bot.handleWebhook.mock.calls.at(0) as unknown as [ParsedLineWebhookPayload];

418418

expect(payload.events).toEqual([{ type: "message" }]);

419419

});

420420

@@ -494,7 +494,7 @@ describe("createLineWebhookMiddleware", () => {

494494

const { res, onEvents } = await invokeWebhook({ body });

495495

expect(res.status).toHaveBeenCalledWith(200);

496496

expect(onEvents).toHaveBeenCalledTimes(1);

497-

const [payload] = onEvents.mock.calls[0] as unknown as [ParsedLineWebhookPayload];

497+

const [payload] = onEvents.mock.calls.at(0) as unknown as [ParsedLineWebhookPayload];

498498

expect(payload.events).toEqual(expectedEvents);

499499

});

500500
Original file line numberDiff line numberDiff line change

@@ -394,7 +394,7 @@ describe("lmstudio setup", () => {

394394

const result = await configureLmstudioNonInteractive(ctx);

395395
396396

const setupCall = requireRecord(

397-

configureSelfHostedNonInteractiveMock.mock.calls[0]?.[0],

397+

configureSelfHostedNonInteractiveMock.mock.calls.at(0)?.[0],

398398

"self-hosted setup call",

399399

);

400400

const setupCtx = requireRecord(setupCall.ctx, "self-hosted setup context");

@@ -653,7 +653,7 @@ describe("lmstudio setup", () => {

653653
654654

await configureLmstudioNonInteractive(ctx);

655655
656-

expectRecordFields(ctx.resolveApiKey.mock.calls[0]?.[0], "resolveApiKey options", {

656+

expectRecordFields(ctx.resolveApiKey.mock.calls.at(0)?.[0], "resolveApiKey options", {

657657

flagValue: "new-lmstudio-key",

658658

flagName: "--lmstudio-api-key",

659659

});

@@ -831,7 +831,7 @@ describe("lmstudio setup", () => {

831831

prompter,

832832

});

833833
834-

const firstTextCall = requireRecord(text.mock.calls[0]?.[0], "first text prompt");

834+

const firstTextCall = requireRecord(text.mock.calls.at(0)?.[0], "first text prompt");

835835

expectRecordFields(firstTextCall, "first text prompt", {

836836

initialValue: "http://host.docker.internal:1234",

837837

placeholder: "http://host.docker.internal:1234",

Original file line numberDiff line numberDiff line change

@@ -56,7 +56,7 @@ describe("matrix profile actions", () => {

5656

});

5757
5858

expect(withResolvedActionClientMock).toHaveBeenCalledTimes(1);

59-

const [wrapperOpts, run, mode] = withResolvedActionClientMock.mock.calls[0] ?? [];

59+

const [wrapperOpts, run, mode] = withResolvedActionClientMock.mock.calls.at(0) ?? [];

6060

expect(wrapperOpts).toEqual({

6161

accountId: "ops",

6262

displayName: " Ops Bot ",

@@ -67,7 +67,7 @@ describe("matrix profile actions", () => {

6767

expect(mode).toBe("persist");

6868
6969

expect(syncMatrixOwnProfileMock).toHaveBeenCalledTimes(1);

70-

const syncCall = syncMatrixOwnProfileMock.mock.calls[0]?.[0] as

70+

const syncCall = syncMatrixOwnProfileMock.mock.calls.at(0)?.[0] as

7171

| {

7272

client: unknown;

7373

userId: string;

@@ -105,7 +105,7 @@ describe("matrix profile actions", () => {

105105

avatarPath: "/tmp/avatar.png",

106106

});

107107
108-

const call = syncMatrixOwnProfileMock.mock.calls[0]?.[0] as

108+

const call = syncMatrixOwnProfileMock.mock.calls.at(0)?.[0] as

109109

| {

110110

loadAvatarFromUrl: (url: string, maxBytes: number) => Promise<unknown>;

111111

loadAvatarFromPath: (path: string, maxBytes: number) => Promise<unknown>;

Original file line numberDiff line numberDiff line change

@@ -78,15 +78,15 @@ type MockWithCalls = {

7878

};

7979
8080

function firstObjectArg(mock: MockWithCalls): Record<string, unknown> {

81-

const value = mock.mock.calls[0]?.[0];

81+

const value = mock.mock.calls.at(0)?.[0];

8282

if (value === undefined || value === null || typeof value !== "object" || Array.isArray(value)) {

8383

throw new Error("expected first mock call object argument");

8484

}

8585

return value as Record<string, unknown>;

8686

}

8787
8888

function objectArgAt(mock: MockWithCalls, index: number): Record<string, unknown> {

89-

const value = mock.mock.calls[0]?.[index];

89+

const value = mock.mock.calls.at(0)?.[index];

9090

if (value === undefined || value === null || typeof value !== "object" || Array.isArray(value)) {

9191

throw new Error(`expected first mock call argument ${index} to be an object`);

9292

}

@@ -171,7 +171,7 @@ describe("createMatrixRoomMessageHandler media failures", () => {

171171

expect(ctx.RawBody).toBe("[matrix image attachment unavailable]");

172172

expect(ctx.CommandBody).toBe("[matrix image attachment unavailable]");

173173

expect(ctx.MediaPath).toBeUndefined();

174-

expect(logger.warn.mock.calls[0]?.[0]).toBe("matrix media download failed");

174+

expect(logger.warn.mock.calls.at(0)?.[0]).toBe("matrix media download failed");

175175

const warningMetadata = objectArgAt(logger.warn, 1);

176176

expect(warningMetadata.eventId).toBe("$event1");

177177

expect(warningMetadata.msgtype).toBe("m.image");

Original file line numberDiff line numberDiff line change

@@ -628,7 +628,7 @@ describe("slash-http", () => {

628628

).resolves.toBe(false);

629629
630630

expect(log).toHaveBeenCalledTimes(1);

631-

const message = log.mock.calls[0]?.[0] ?? "";

631+

const message = log.mock.calls.at(0)?.[0] ?? "";

632632

expect(message).not.toMatch(/[\r\n\t]/u);

633633

expect(message).toContain("deleted command cmd-1 spoofed");

634634

expect(message).toContain("using team list fallback");

@@ -753,7 +753,7 @@ describe("slash-http", () => {

753753

).resolves.toBe(true);

754754
755755

expect(log).toHaveBeenCalledTimes(1);

756-

const message = log.mock.calls[0]?.[0] ?? "";

756+

const message = log.mock.calls.at(0)?.[0] ?? "";

757757

expect(message).not.toMatch(/[\r\n\t]/u);

758758

expect(message).toContain("/oc_status spoofed");

759759

expect(message).toContain("primary token=[redacted]");

@@ -792,7 +792,7 @@ describe("slash-http", () => {

792792

).resolves.toBe(false);

793793
794794

expect(log).toHaveBeenCalledTimes(1);

795-

const message = log.mock.calls[0]?.[0] ?? "";

795+

const message = log.mock.calls.at(0)?.[0] ?? "";

796796

expect(message).not.toMatch(/[\r\n\t]/u);

797797

expect(message).toContain("fallback second-line");

798798

expect(message).toContain("botToken: [redacted]");