feat(FN-2324): merge fusion/fn-2324
This commit is contained in:
@@ -174,10 +174,14 @@ describe("bin", () => {
|
||||
return import("../bin.ts");
|
||||
}
|
||||
|
||||
it("routes task list with --project before subcommand", async () => {
|
||||
await runBin(["--project", "my-app", "task", "list"]);
|
||||
expect(runTaskList).toHaveBeenCalledWith("my-app");
|
||||
});
|
||||
it(
|
||||
"routes task list with --project before subcommand",
|
||||
async () => {
|
||||
await runBin(["--project", "my-app", "task", "list"]);
|
||||
expect(runTaskList).toHaveBeenCalledWith("my-app");
|
||||
},
|
||||
15000,
|
||||
);
|
||||
|
||||
it("preserves legacy task list behavior when project flag is absent", async () => {
|
||||
await runBin(["task", "list"]);
|
||||
|
||||
@@ -243,10 +243,14 @@ describe("bin command routing and fallbacks", () => {
|
||||
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Usage:"));
|
||||
});
|
||||
|
||||
it("prints an error for unknown top-level command", async () => {
|
||||
await expect(runBin(["unknown-cmd"])).rejects.toThrow("process.exit:1");
|
||||
expect(errorSpy).toHaveBeenCalledWith("Unknown command: unknown-cmd");
|
||||
});
|
||||
it(
|
||||
"prints an error for unknown top-level command",
|
||||
async () => {
|
||||
await expect(runBin(["unknown-cmd"])).rejects.toThrow("process.exit:1");
|
||||
expect(errorSpy).toHaveBeenCalledWith("Unknown command: unknown-cmd");
|
||||
},
|
||||
15000,
|
||||
);
|
||||
|
||||
it("errors on duplicate --project flags", async () => {
|
||||
await expect(runBin(["task", "list", "--project", "alpha", "-P", "beta"])).rejects.toThrow(
|
||||
|
||||
Reference in New Issue
Block a user