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

推荐订阅源

M
MIT News - Artificial intelligence
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
The Cloudflare Blog
IT之家
IT之家
雷峰网
雷峰网
小众软件
小众软件
博客园 - 叶小钗
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
博客园 - 【当耐特】
V
V2EX
博客园_首页
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: tighten google meet cli assertions · openclaw/openc...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -42,6 +42,27 @@ function captureStdout() {

4242

};

4343

}

444445+

function expectFields(value: unknown, expected: Record<string, unknown>): void {

46+

expect(value).toBeTypeOf("object");

47+

expect(value).not.toBeNull();

48+

const record = value as Record<string, unknown>;

49+

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

50+

expect(record[key], key).toEqual(expectedValue);

51+

}

52+

}

53+54+

function firstRecord(value: unknown): Record<string, unknown> {

55+

expect(Array.isArray(value)).toBe(true);

56+

const [record] = value as unknown[];

57+

expect(record).toBeTypeOf("object");

58+

expect(record).not.toBeNull();

59+

return record as Record<string, unknown>;

60+

}

61+62+

function parseStdoutJson(stdout: { output: () => string }): Record<string, unknown> {

63+

return JSON.parse(stdout.output()) as Record<string, unknown>;

64+

}

65+4566

function jsonResponse(value: unknown): Response {

4667

return new Response(JSON.stringify(value), {

4768

status: 200,

@@ -260,9 +281,11 @@ describe("google-meet CLI", () => {

260281

}),

261282

},

262283

}).parseAsync(["googlemeet", "setup", "--json"], { from: "user" });

263-

expect(JSON.parse(stdout.output())).toMatchObject({

284+

const payload = parseStdoutJson(stdout);

285+

expectFields(payload, { ok: false });

286+

expectFields(firstRecord(payload.checks), {

287+

id: "twilio-voice-call-plugin",

264288

ok: false,

265-

checks: [{ id: "twilio-voice-call-plugin", ok: false }],

266289

});

267290

} finally {

268291

stdout.restore();

@@ -289,22 +312,21 @@ describe("google-meet CLI", () => {

289312

],

290313

{ from: "user" },

291314

);

292-

expect(JSON.parse(artifactsStdout.output())).toMatchObject({

293-

conferenceRecords: [{ name: "conferenceRecords/rec-1" }],

294-

artifacts: [

295-

{

296-

recordings: [{ name: "conferenceRecords/rec-1/recordings/r1" }],

297-

transcripts: [{ name: "conferenceRecords/rec-1/transcripts/t1" }],

298-

transcriptEntries: [

299-

{

300-

transcript: "conferenceRecords/rec-1/transcripts/t1",

301-

entries: [{ text: "Hello from the transcript." }],

302-

},

303-

],

304-

smartNotes: [{ name: "conferenceRecords/rec-1/smartNotes/sn1" }],

305-

},

306-

],

307-

tokenSource: "cached-access-token",

315+

const payload = parseStdoutJson(artifactsStdout);

316+

expectFields(payload, { tokenSource: "cached-access-token" });

317+

expectFields(firstRecord(payload.conferenceRecords), { name: "conferenceRecords/rec-1" });

318+

const artifact = firstRecord(payload.artifacts);

319+

expectFields(firstRecord(artifact.recordings), {

320+

name: "conferenceRecords/rec-1/recordings/r1",

321+

});

322+

expectFields(firstRecord(artifact.transcripts), {

323+

name: "conferenceRecords/rec-1/transcripts/t1",

324+

});

325+

const transcriptEntries = firstRecord(artifact.transcriptEntries);

326+

expectFields(transcriptEntries, { transcript: "conferenceRecords/rec-1/transcripts/t1" });

327+

expectFields(firstRecord(transcriptEntries.entries), { text: "Hello from the transcript." });

328+

expectFields(firstRecord(artifact.smartNotes), {

329+

name: "conferenceRecords/rec-1/smartNotes/sn1",

308330

});

309331

} finally {

310332

artifactsStdout.restore();

@@ -367,7 +389,7 @@ describe("google-meet CLI", () => {

367389

],

368390

{ from: "user" },

369391

);

370-

expect(JSON.parse(stdout.output())).toMatchObject({

392+

expectFields(parseStdoutJson(stdout), {

371393

space: "spaces/space-resource-123",

372394

ended: true,

373395

tokenSource: "cached-access-token",

@@ -602,28 +624,26 @@ describe("google-meet CLI", () => {

602624

"Transcript document body.",

603625

);

604626

const manifest = JSON.parse(readFileSync(path.join(tempDir, "manifest.json"), "utf8"));

605-

expect(manifest).toMatchObject({

606-

request: {

607-

conferenceRecord: "rec-1",

608-

includeDocumentBodies: true,

609-

},

627+

expectFields(manifest.request, {

628+

conferenceRecord: "rec-1",

629+

includeDocumentBodies: true,

630+

});

631+

expectFields(manifest, {

610632

tokenSource: "cached-access-token",

611-

counts: {

612-

attendanceRows: 1,

613-

warnings: 0,

614-

},

615-

files: [

616-

"summary.md",

617-

"attendance.csv",

618-

"transcript.md",

619-

"artifacts.json",

620-

"attendance.json",

621-

"manifest.json",

622-

],

623633

});

624-

expect(JSON.parse(readFileSync(path.join(tempDir, "artifacts.json"), "utf8"))).toMatchObject({

625-

conferenceRecords: [{ name: "conferenceRecords/rec-1" }],

626-

artifacts: [{ transcripts: [{ documentText: "Transcript document body." }] }],

634+

expectFields(manifest.counts, { attendanceRows: 1, warnings: 0 });

635+

expect(manifest.files).toEqual([

636+

"summary.md",

637+

"attendance.csv",

638+

"transcript.md",

639+

"artifacts.json",

640+

"attendance.json",

641+

"manifest.json",

642+

]);

643+

const artifacts = JSON.parse(readFileSync(path.join(tempDir, "artifacts.json"), "utf8"));

644+

expectFields(firstRecord(artifacts.conferenceRecords), { name: "conferenceRecords/rec-1" });

645+

expectFields(firstRecord(firstRecord(artifacts.artifacts).transcripts), {

646+

documentText: "Transcript document body.",

627647

});

628648

expect(readFileSync(`${tempDir}.zip`).subarray(0, 4).toString("hex")).toBe("504b0304");

629649

} finally {

@@ -660,15 +680,11 @@ describe("google-meet CLI", () => {

660680

expect(summary).toContain("### Warnings");

661681

expect(summary).toContain("Document body warning");

662682

const manifest = JSON.parse(readFileSync(path.join(tempDir, "manifest.json"), "utf8"));

663-

expect(manifest).toMatchObject({

664-

counts: { warnings: 1 },

665-

warnings: [

666-

{

667-

type: "smart_note_document_body",

668-

conferenceRecord: "conferenceRecords/rec-1",

669-

resource: "conferenceRecords/rec-1/smartNotes/sn1",

670-

},

671-

],

683+

expectFields(manifest.counts, { warnings: 1 });

684+

expectFields(firstRecord(manifest.warnings), {

685+

type: "smart_note_document_body",

686+

conferenceRecord: "conferenceRecords/rec-1",

687+

resource: "conferenceRecords/rec-1/smartNotes/sn1",

672688

});

673689

} finally {

674690

stdout.restore();

@@ -700,9 +716,11 @@ describe("google-meet CLI", () => {

700716

}),

701717

},

702718

}).parseAsync(["googlemeet", "status", "--json"], { from: "user" });

703-

expect(JSON.parse(stdout.output())).toMatchObject({

704-

found: true,

705-

sessions: [{ id: "meet_1", transport: "twilio" }],

719+

const payload = parseStdoutJson(stdout);

720+

expectFields(payload, { found: true });

721+

expectFields(firstRecord(payload.sessions), {

722+

id: "meet_1",

723+

transport: "twilio",

706724

});

707725

} finally {

708726

stdout.restore();

@@ -743,9 +761,11 @@ describe("google-meet CLI", () => {

743761

{ progress: false },

744762

);

745763

expect(ensureRuntime).not.toHaveBeenCalled();

746-

expect(JSON.parse(stdout.output())).toMatchObject({

747-

found: true,

748-

sessions: [{ id: "meet_gateway", transport: "chrome-node" }],

764+

const payload = parseStdoutJson(stdout);

765+

expectFields(payload, { found: true });

766+

expectFields(firstRecord(payload.sessions), {

767+

id: "meet_gateway",

768+

transport: "chrome-node",

749769

});

750770

} finally {

751771

stdout.restore();

@@ -812,7 +832,7 @@ describe("google-meet CLI", () => {

812832

});

813833

expect(gatewayCall?.[3]).toEqual({ progress: false });

814834

expect(ensureRuntime).not.toHaveBeenCalled();

815-

expect(JSON.parse(stdout.output())).toMatchObject({

835+

expectFields(parseStdoutJson(stdout), {

816836

id: "meet_gateway",

817837

transport: "chrome-node",

818838

});

@@ -875,10 +895,9 @@ describe("google-meet CLI", () => {

875895

{ progress: false },

876896

);

877897

expect(ensureRuntime).not.toHaveBeenCalled();

878-

expect(JSON.parse(stdout.output())).toMatchObject({

879-

createdSession: true,

880-

session: { mode: "bidi" },

881-

});

898+

const payload = parseStdoutJson(stdout);

899+

expectFields(payload, { createdSession: true });

900+

expectFields(payload.session, { mode: "bidi" });

882901

} finally {

883902

stdout.restore();

884903

}

@@ -924,7 +943,7 @@ describe("google-meet CLI", () => {

924943

transport: "chrome-node",

925944

timeoutMs: 30000,

926945

});

927-

expect(JSON.parse(stdout.output())).toMatchObject({

946+

expectFields(parseStdoutJson(stdout), {

928947

listenVerified: true,

929948

transcriptLines: 1,

930949

});

@@ -958,29 +977,27 @@ describe("google-meet CLI", () => {

958977

{ from: "user" },

959978

);

960979

const payload = JSON.parse(stdout.output());

961-

expect(payload).toMatchObject({

980+

expectFields(payload, {

962981

dryRun: true,

963-

manifest: {

964-

request: {

965-

conferenceRecord: "rec-1",

966-

includeDocumentBodies: true,

967-

},

968-

counts: {

969-

attendanceRows: 1,

970-

transcriptEntries: 1,

971-

warnings: 0,

972-

},

973-

files: [

974-

"summary.md",

975-

"attendance.csv",

976-

"transcript.md",

977-

"artifacts.json",

978-

"attendance.json",

979-

"manifest.json",

980-

],

981-

},

982982

tokenSource: "cached-access-token",

983983

});

984+

expectFields(payload.manifest.request, {

985+

conferenceRecord: "rec-1",

986+

includeDocumentBodies: true,

987+

});

988+

expectFields(payload.manifest.counts, {

989+

attendanceRows: 1,

990+

transcriptEntries: 1,

991+

warnings: 0,

992+

});

993+

expect(payload.manifest.files).toEqual([

994+

"summary.md",

995+

"attendance.csv",

996+

"transcript.md",

997+

"artifacts.json",

998+

"attendance.json",

999+

"manifest.json",

1000+

]);

9841001

expect(existsSync(outputDir)).toBe(false);

9851002

} finally {

9861003

stdout.restore();

@@ -1115,15 +1132,15 @@ describe("google-meet CLI", () => {

11151132

expect(output).not.toContain("new-access-token");

11161133

expect(output).not.toContain("rt-secret");

11171134

expect(output).not.toContain("client-secret");

1118-

expect(JSON.parse(output)).toMatchObject({

1135+

const payload = JSON.parse(output) as Record<string, unknown>;

1136+

expectFields(payload, {

11191137

ok: true,

11201138

configured: true,

11211139

tokenSource: "refresh-token",

1122-

checks: [

1123-

{ id: "oauth-config", ok: true },

1124-

{ id: "oauth-token", ok: true },

1125-

],

11261140

});

1141+

const checks = payload.checks as unknown[];

1142+

expectFields(checks[0], { id: "oauth-config", ok: true });

1143+

expectFields(checks[1], { id: "oauth-token", ok: true });

11271144

expect(ensureRuntime).not.toHaveBeenCalled();

11281145

const body = fetchMock.mock.calls[0]?.[1]?.body as URLSearchParams;

11291146

expect(body.get("grant_type")).toBe("refresh_token");

@@ -1166,17 +1183,17 @@ describe("google-meet CLI", () => {

11661183

}).parseAsync(["googlemeet", "doctor", "--oauth", "--create-space", "--json"], {

11671184

from: "user",

11681185

});

1169-

expect(JSON.parse(stdout.output())).toMatchObject({

1186+

const payload = parseStdoutJson(stdout);

1187+

expectFields(payload, {

11701188

ok: true,

11711189

tokenSource: "refresh-token",

11721190

createdSpace: "spaces/new-space",

11731191

meetingUri: "https://meet.google.com/new-abcd-xyz",

1174-

checks: [

1175-

{ id: "oauth-config", ok: true },

1176-

{ id: "oauth-token", ok: true },

1177-

{ id: "meet-spaces-create", ok: true },

1178-

],

11791192

});

1193+

const checks = payload.checks as unknown[];

1194+

expectFields(checks[0], { id: "oauth-config", ok: true });

1195+

expectFields(checks[1], { id: "oauth-token", ok: true });

1196+

expectFields(checks[2], { id: "meet-spaces-create", ok: true });

11801197

} finally {

11811198

stdout.restore();

11821199

}