Skip to content

Commit 83da238

Browse files
committed
fix: tests after migration of cli package to new error system
1 parent f7e57c7 commit 83da238

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/cli/cli/src/commands/install-dependencies/__test__/installDependencies.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AbsoluteFilePath } from "@fern-api/fs-utils";
2+
import { CliError } from "@fern-api/task-context";
23
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
34

45
vi.mock("@fern-api/lazy-fern-workspace", () => ({
@@ -88,7 +89,11 @@ describe("installDependencies", () => {
8889
await expect(installDependencies({ cliContext: mockCliContext })).rejects.toThrow("Failed to install: buf");
8990

9091
expect(mockContext.logger.error).toHaveBeenCalledWith("Failed to install buf");
91-
expect(mockContext.failAndThrow).toHaveBeenCalledWith(expect.stringContaining("Failed to install: buf"));
92+
expect(mockContext.failAndThrow).toHaveBeenCalledWith(
93+
expect.stringContaining("Failed to install: buf"),
94+
undefined,
95+
{ code: CliError.Code.EnvironmentError }
96+
);
9297
});
9398

9499
it("fails when protoc-gen-openapi resolution returns undefined", async () => {

0 commit comments

Comments
 (0)