



















@@ -105,15 +105,13 @@ describe("bundle LSP runtime", () => {
105105106106const runtime = await createBundleLspToolRuntime({ workspaceDir: "/tmp/workspace" });
107107108-expect(spawnMock).toHaveBeenCalledWith(
109-"typescript-language-server",
110-["--stdio"],
111-expect.objectContaining({
112-detached: process.platform !== "win32",
113-stdio: ["pipe", "pipe", "pipe"],
114-windowsHide: process.platform === "win32",
115-}),
116-);
108+expect(spawnMock).toHaveBeenCalledTimes(1);
109+const [command, args, options] = spawnMock.mock.calls[0] ?? [];
110+expect(command).toBe("typescript-language-server");
111+expect(args).toEqual(["--stdio"]);
112+expect(options?.detached).toBe(process.platform !== "win32");
113+expect(options?.stdio).toEqual(["pipe", "pipe", "pipe"]);
114+expect(options?.windowsHide).toBe(process.platform === "win32");
117115expect(runtime.tools.map((tool) => tool.name)).toContain("lsp_hover_typescript");
118116119117await runtime.dispose();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。