Add seal-home ZCode plugin packaging
This commit is contained in:
1 parent
0959cef1cc
commit
38610d3573
24 files changed
+31884
-1655
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { runCli } from "./runner.js";
|
||||
|
||||
describe("CLI runner", () => {
|
||||
test("returns version output without touching the process lifecycle", async () => {
|
||||
const result = await runCli(["version"]);
|
||||
|
||||
expect(result).toMatchObject({
|
||||
stderr: "",
|
||||
isError: false,
|
||||
exitCode: 0
|
||||
});
|
||||
expect(JSON.parse(result.stdout)).toMatchObject({ name: "seal-home" });
|
||||
});
|
||||
|
||||
test("returns diagnostics and a non-zero exit code for invalid commands", async () => {
|
||||
const result = await runCli(["not-a-command"]);
|
||||
|
||||
expect(result.isError).toBe(true);
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.stderr).toContain("Unknown command: not-a-command");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user