@@ -5,6 +5,8 @@ const { spawnMock } = vi.hoisted(() => ({
|
5 | 5 | spawnMock: vi.fn(), |
6 | 6 | })); |
7 | 7 | |
| 8 | +const tailscaleSpawnOptions = { stdio: ["ignore", "pipe", "pipe"] } as const; |
| 9 | + |
8 | 10 | vi.mock("node:child_process", async () => { |
9 | 11 | const { mockNodeBuiltinModule } = await import("openclaw/plugin-sdk/test-node-mocks"); |
10 | 12 | return mockNodeBuiltinModule( |
@@ -126,19 +128,19 @@ describe("voice-call tailscale helpers", () => {
|
126 | 128 | 1, |
127 | 129 | "tailscale", |
128 | 130 | ["status", "--json"], |
129 | | -expect.objectContaining({ stdio: ["ignore", "pipe", "pipe"] }), |
| 131 | +tailscaleSpawnOptions, |
130 | 132 | ); |
131 | 133 | expect(spawnMock).toHaveBeenNthCalledWith( |
132 | 134 | 2, |
133 | 135 | "tailscale", |
134 | 136 | ["serve", "--bg", "--yes", "--set-path", "/voice", "http://127.0.0.1:8787/webhook"], |
135 | | -expect.any(Object), |
| 137 | +tailscaleSpawnOptions, |
136 | 138 | ); |
137 | 139 | expect(spawnMock).toHaveBeenNthCalledWith( |
138 | 140 | 3, |
139 | 141 | "tailscale", |
140 | 142 | ["serve", "off", "/voice"], |
141 | | -expect.any(Object), |
| 143 | +tailscaleSpawnOptions, |
142 | 144 | ); |
143 | 145 | }); |
144 | 146 | |
@@ -202,13 +204,13 @@ describe("voice-call tailscale helpers", () => {
|
202 | 204 | 2, |
203 | 205 | "tailscale", |
204 | 206 | ["funnel", "--bg", "--yes", "--set-path", "/voice", "http://127.0.0.1:8787/webhook"], |
205 | | -expect.any(Object), |
| 207 | +tailscaleSpawnOptions, |
206 | 208 | ); |
207 | 209 | expect(spawnMock).toHaveBeenNthCalledWith( |
208 | 210 | 3, |
209 | 211 | "tailscale", |
210 | 212 | ["serve", "off", "/voice"], |
211 | | -expect.any(Object), |
| 213 | +tailscaleSpawnOptions, |
212 | 214 | ); |
213 | 215 | }); |
214 | 216 | }); |