test: isolate google meet node host clear audio

This commit is contained in:
Peter Steinberger
2026-04-27 07:43:42 +01:00
parent d386075391
commit 29f825bea5

View File

@@ -51,7 +51,7 @@ describe("google-meet node host bridge sessions", () => {
await handleGoogleMeetNodeHostCommand(
JSON.stringify({
action: "start",
url: "https://meet.google.com/abc-defg-hij",
url: "https://meet.google.com/xyz-abcd-uvw",
mode: "realtime",
launch: false,
audioInputCommand: ["mock-rec"],
@@ -77,6 +77,7 @@ describe("google-meet node host bridge sessions", () => {
expect(firstOutput?.kill).toHaveBeenCalledWith("SIGTERM");
firstOutput?.emit("error", new Error("stale output failed after clear"));
firstOutput?.emit("exit", 0, "SIGTERM");
const status = JSON.parse(
await handleGoogleMeetNodeHostCommand(
@@ -104,6 +105,13 @@ describe("google-meet node host bridge sessions", () => {
expect(children[2]?.stdin?.write).toHaveBeenCalledWith(audio);
expect(firstOutput?.stdin?.write).not.toHaveBeenCalled();
await handleGoogleMeetNodeHostCommand(
JSON.stringify({
action: "stop",
bridgeId: start.bridgeId,
}),
);
} finally {
Object.defineProperty(process, "platform", { configurable: true, value: originalPlatform });
}