mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-09 03:16:38 +00:00
fix(cli): require explicit non-interactive init source (#2395)
This commit is contained in:
@@ -43,6 +43,19 @@ function expectScaffoldedScripts(target: string): void {
|
||||
}
|
||||
|
||||
describe("hyperframes init flag rename", () => {
|
||||
it("requires an explicit source in non-interactive mode", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "hf-init-test-"));
|
||||
const target = join(dir, "proj");
|
||||
try {
|
||||
const res = runInit([target, "--non-interactive"]);
|
||||
expect(res.status).toBe(1);
|
||||
expect(res.stderr).toContain("Non-interactive init requires --example, --video, or --audio");
|
||||
expect(existsSync(target)).toBe(false);
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("rejects a following flag when --example has no value", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "hf-init-test-"));
|
||||
const target = join(dir, "proj");
|
||||
|
||||
Reference in New Issue
Block a user