























@@ -1515,15 +1515,14 @@ describe("google-meet plugin", () => {
15151515const result = await tool.execute("id", { action: "setup_status" });
1516151615171517expect(result.details.ok).toBe(false);
1518-expect(result.details.checks).toEqual(
1519-expect.arrayContaining([
1520-expect.objectContaining({
1521-id: "audio-bridge",
1522-ok: false,
1523-message: expect.stringContaining("chrome.audioBridgeCommand is bidi-only"),
1524-}),
1525-]),
1526-);
1518+const audioBridgeCheck = result.details.checks
1519+?.map((check) => requireRecord(check, "setup check"))
1520+.find((check) => check.id === "audio-bridge");
1521+if (!audioBridgeCheck) {
1522+throw new Error("Expected audio-bridge setup check");
1523+}
1524+expect(audioBridgeCheck.ok).toBe(false);
1525+expect(String(audioBridgeCheck.message)).toContain("chrome.audioBridgeCommand is bidi-only");
15271526} finally {
15281527Object.defineProperty(process, "platform", { value: originalPlatform });
15291528}
@@ -1547,7 +1546,8 @@ describe("google-meet plugin", () => {
15471546pageSize: 3,
15481547});
154915481550-expect(result.details.attendance).toEqual([expect.objectContaining({ displayName: "Alice" })]);
1549+expect(result.details.attendance).toHaveLength(1);
1550+expect(result.details.attendance?.[0]?.displayName).toBe("Alice");
15511551});
1552155215531553it("writes export bundles through the tool", async () => {
@@ -1572,22 +1572,37 @@ describe("google-meet plugin", () => {
15721572zip: true,
15731573});
157415741575-expect(result.details.files).toEqual(
1576-expect.arrayContaining([path.join(tempDir, "manifest.json")]),
1577-);
1575+expect(result.details.files).toContain(path.join(tempDir, "manifest.json"));
15781576expect(result.details.zipFile).toBe(`${tempDir}.zip`);
1579-const manifest = JSON.parse(readFileSync(path.join(tempDir, "manifest.json"), "utf8"));
1580-expect(manifest).toMatchObject({
1581-request: {
1582-conferenceRecord: "rec-1",
1583-includeDocumentBodies: true,
1584-},
1585-counts: {
1586-attendanceRows: 1,
1587-warnings: 0,
1588-},
1589-files: expect.arrayContaining(["summary.md", "manifest.json"]),
1577+const manifest = requireRecord(
1578+JSON.parse(readFileSync(path.join(tempDir, "manifest.json"), "utf8")),
1579+"export manifest",
1580+);
1581+expect(manifest.request).toEqual({
1582+conferenceRecord: "rec-1",
1583+includeDocumentBodies: true,
1584+includeTranscriptEntries: true,
1585+allConferenceRecords: false,
1586+mergeDuplicateParticipants: true,
15901587});
1588+expect(manifest.counts).toEqual({
1589+conferenceRecords: 1,
1590+artifacts: 1,
1591+recordings: 1,
1592+transcripts: 1,
1593+transcriptEntries: 1,
1594+smartNotes: 1,
1595+attendanceRows: 1,
1596+warnings: 0,
1597+});
1598+expect(manifest.files).toEqual([
1599+"summary.md",
1600+"attendance.csv",
1601+"transcript.md",
1602+"artifacts.json",
1603+"attendance.json",
1604+"manifest.json",
1605+]);
15911606} finally {
15921607rmSync(tempDir, { recursive: true, force: true });
15931608rmSync(`${tempDir}.zip`, { force: true });
@@ -1616,12 +1631,15 @@ describe("google-meet plugin", () => {
16161631dryRun: true,
16171632});
161816331619-expect(result.details).toMatchObject({
1620-dryRun: true,
1621-manifest: {
1622-files: expect.arrayContaining(["summary.md", "manifest.json"]),
1623-},
1624-});
1634+expect(result.details.dryRun).toBe(true);
1635+expect(result.details.manifest?.files).toEqual([
1636+"summary.md",
1637+"attendance.csv",
1638+"transcript.md",
1639+"artifacts.json",
1640+"attendance.json",
1641+"manifest.json",
1642+]);
16251643expect(existsSync(outputDir)).toBe(false);
16261644} finally {
16271645rmSync(parentDir, { recursive: true, force: true });
@@ -1645,7 +1663,7 @@ describe("google-meet plugin", () => {
16451663meeting: "abc-defg-hij",
16461664});
164716651648-expect(result.details.conferenceRecord).toMatchObject({ name: "conferenceRecords/rec-1" });
1666+expect(result.details.conferenceRecord?.name).toBe("conferenceRecords/rec-1");
16491667});
1650166816511669it("reports the latest conference record from today's calendar through the tool", async () => {
@@ -1665,9 +1683,7 @@ describe("google-meet plugin", () => {
16651683today: true,
16661684});
166716851668-expect(result.details.calendarEvent).toMatchObject({
1669-meetingUri: "https://meet.google.com/abc-defg-hij",
1670-});
1686+expect(result.details.calendarEvent?.meetingUri).toBe("https://meet.google.com/abc-defg-hij");
16711687});
1672168816731689it("reports calendar event previews through the tool", async () => {
@@ -1687,12 +1703,9 @@ describe("google-meet plugin", () => {
16871703today: true,
16881704});
168917051690-expect(result.details.events).toEqual([
1691-expect.objectContaining({
1692-selected: true,
1693-meetingUri: "https://meet.google.com/abc-defg-hij",
1694-}),
1695-]);
1706+expect(result.details.events).toHaveLength(1);
1707+expect(result.details.events?.[0]?.selected).toBe(true);
1708+expect(result.details.events?.[0]?.meetingUri).toBe("https://meet.google.com/abc-defg-hij");
16961709});
1697171016981711it("fails setup status when the configured Chrome node is not connected", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。