



























@@ -3445,9 +3445,10 @@ describe("google-meet plugin", () => {
34453445params: { url: "https://meet.google.com/abc-defg-hij" },
34463446respond: joinRespond,
34473447});
3448-expect(joinRespond.mock.calls[0]?.[1]).toMatchObject({
3449-session: { chrome: { health: { inCall: false } } },
3450-});
3448+const joinPayload = requireRecord(joinRespond.mock.calls[0]?.[1], "join response payload");
3449+const joinSession = requireRecord(joinPayload.session, "join session");
3450+const joinChrome = requireRecord(joinSession.chrome, "join chrome session");
3451+expect(requireRecord(joinChrome.health, "join chrome health").inCall).toBe(false);
34513452browserState = {
34523453inCall: true,
34533454micMuted: false,
@@ -3456,19 +3457,18 @@ describe("google-meet plugin", () => {
34563457};
34573458await status?.({ params: {}, respond: statusRespond });
345834593459-expect(statusRespond.mock.calls[0]?.[1]).toMatchObject({
3460-sessions: [
3461-{
3462-chrome: {
3463-health: {
3464-inCall: true,
3465-speechReady: false,
3466-speechBlockedReason: "audio-bridge-unavailable",
3467-},
3468-},
3469-},
3470-],
3471-});
3460+const statusPayload = requireRecord(
3461+statusRespond.mock.calls[0]?.[1],
3462+"status response payload",
3463+);
3464+const sessions = statusPayload.sessions as unknown[];
3465+expect(sessions).toHaveLength(1);
3466+const statusSession = requireRecord(sessions[0], "status session");
3467+const statusChrome = requireRecord(statusSession.chrome, "status chrome session");
3468+const statusHealth = requireRecord(statusChrome.health, "status chrome health");
3469+expect(statusHealth.inCall).toBe(true);
3470+expect(statusHealth.speechReady).toBe(false);
3471+expect(statusHealth.speechBlockedReason).toBe("audio-bridge-unavailable");
34723472} finally {
34733473Object.defineProperty(process, "platform", { value: originalPlatform });
34743474}
@@ -3508,16 +3508,21 @@ describe("google-meet plugin", () => {
35083508timeoutMs: 100,
35093509});
351035103511-expect(nodesInvoke).toHaveBeenCalledWith(
3512-expect.objectContaining({
3513-command: "googlemeet.chrome",
3514-params: expect.objectContaining({
3515-action: "start",
3516-mode: "transcribe",
3517-}),
3518-}),
3511+const startCall = nodesInvoke.mock.calls.find(([rawCall]) => {
3512+const call = requireRecord(rawCall, "node invoke");
3513+const params = requireRecord(call.params, "node invoke params");
3514+return call.command === "googlemeet.chrome" && params.action === "start";
3515+});
3516+if (!startCall) {
3517+throw new Error("Expected googlemeet.chrome start node invoke");
3518+}
3519+const startParams = requireRecord(
3520+requireRecord(startCall[0], "start node invoke").params,
3521+"start params",
35193522);
3520-expect(result.details).toMatchObject({ listenVerified: true, transcriptLines: 1 });
3523+expect(startParams.mode).toBe("transcribe");
3524+expect(result.details.listenVerified).toBe(true);
3525+expect(result.details.transcriptLines).toBe(1);
35213526});
3522352735233528it("does not start a second realtime response for test speech", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。