18 lines
675 B
TypeScript
18 lines
675 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { globalBinCandidates, parseDevOverrideArgs } from "./dev-override.js";
|
|
|
|
describe("dev:override", () => {
|
|
test("parses dry-run and explicit target path without touching the host", () => {
|
|
expect(parseDevOverrideArgs(["--dry-run", "--target-path=/tmp/hose-use-test"])).toEqual({
|
|
dryRun: true,
|
|
targetPath: "/tmp/hose-use-test",
|
|
});
|
|
});
|
|
|
|
test("uses stable global binary locations", () => {
|
|
const candidates = globalBinCandidates("hose-use-test");
|
|
expect(candidates.some((candidate) => candidate.endsWith("/hose-use-test"))).toBe(true);
|
|
expect(candidates).toHaveLength(4);
|
|
});
|
|
});
|