



























@@ -35,7 +35,7 @@ vi.mock("./webhook/tailscale.js", () => ({
3535getTailscaleDnsName: mocks.getTailscaleDnsName,
3636}));
373738-import { isNgrokAvailable, startNgrokTunnel, startTailscaleTunnel, startTunnel } from "./tunnel.js";
38+import { startNgrokTunnel, startTailscaleTunnel, startTunnel } from "./tunnel.js";
39394040function nextProcess(): FakeChildProcess {
4141const proc = new FakeChildProcess();
@@ -53,25 +53,6 @@ describe("voice-call tunnels", () => {
5353mocks.getTailscaleDnsName.mockReset();
5454});
555556-it("checks ngrok availability from the version command exit code", async () => {
57-const proc = nextProcess();
58-const result = isNgrokAvailable();
59-proc.close(0);
60-61-await expect(result).resolves.toBe(true);
62-expect(mocks.spawn).toHaveBeenCalledWith("ngrok", ["version"], {
63-stdio: "ignore",
64-});
65-});
66-67-it("treats ngrok spawn failures as unavailable", async () => {
68-const proc = nextProcess();
69-const result = isNgrokAvailable();
70-proc.fail(new Error("spawn ngrok ENOENT"));
71-72-await expect(result).resolves.toBe(false);
73-});
74-7556it("starts ngrok and appends the webhook path to the public URL", async () => {
7657const proc = nextProcess();
7758const result = startNgrokTunnel({ port: 3334, path: "/voice/webhook" });
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。