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

推荐订阅源

The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
Engineering at Meta
Engineering at Meta
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 司徒正美
I
InfoQ
S
SegmentFault 最新的问题
博客园 - 叶小钗
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
IT之家
IT之家
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
月光博客
月光博客
The Cloudflare Blog
U
Unit 42
GbyAI
GbyAI
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure 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 media store error assertions · openclaw/ope...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -37,7 +37,14 @@ describe("media store", () => {

3737

}

38383939

async function expectPathMissing(targetPath: string): Promise<void> {

40-

await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" });

40+

let statError: unknown;

41+

try {

42+

await fs.stat(targetPath);

43+

} catch (error) {

44+

statError = error;

45+

}

46+

expect(statError).toBeInstanceOf(Error);

47+

expect((statError as NodeJS.ErrnoException).code).toBe("ENOENT");

4148

}

42494350

async function expectOriginalFilenameCase(params: {

@@ -134,9 +141,14 @@ describe("media store", () => {

134141

);

135142

await withTempStore(async (_store) => {

136143

const mediaDir = await storeWithMock.ensureMediaDir();

137-

await expect(

138-

storeWithMock.saveMediaBuffer(Buffer.from("voice"), "audio/ogg", "failed-buffer"),

139-

).rejects.toMatchObject({ code: "ENOSPC" });

144+

let saveError: unknown;

145+

try {

146+

await storeWithMock.saveMediaBuffer(Buffer.from("voice"), "audio/ogg", "failed-buffer");

147+

} catch (error) {

148+

saveError = error;

149+

}

150+

expect(saveError).toBeInstanceOf(Error);

151+

expect((saveError as NodeJS.ErrnoException).code).toBe("ENOSPC");

140152141153

const failedDir = path.join(mediaDir, "failed-buffer");

142154

const entries = await fs.readdir(failedDir).catch(() => []);

@@ -260,12 +272,21 @@ describe("media store", () => {

260272

params.setupSource !== undefined

261273

? await params.setupSource(home)

262274

: path.join(home, params.relativeSourcePath ?? "");

263-

const rejection = expect(store.saveMediaSource(sourcePath)).rejects;

264275

if (typeof params.expectedError === "string") {

276+

const rejection = expect(store.saveMediaSource(sourcePath)).rejects;

265277

await rejection.toThrow(params.expectedError);

266278

return;

267279

}

268-

await rejection.toMatchObject(params.expectedError);

280+

let sourceError: unknown;

281+

try {

282+

await store.saveMediaSource(sourcePath);

283+

} catch (error) {

284+

sourceError = error;

285+

}

286+

expect(sourceError).toBeInstanceOf(Error);

287+

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

288+

expect((sourceError as Record<string, unknown>)[key]).toStrictEqual(value);

289+

}

269290

});

270291

}

271292