import path from "path";
import { resolveSaveStoragePath } from "./resolveSaveStoragePath.js";
describe("resolveSaveStoragePath", () => {
    const outputDir = "/abs/output";
    it("joins a bare filename with outputDir", () => {
        expect(resolveSaveStoragePath("auth.json", outputDir)).toBe(path.join(outputDir, "auth.json"));
    });
    it("returns an absolute path unchanged", () => {
        expect(resolveSaveStoragePath("/tmp/storage.json", outputDir)).toBe("/tmp/storage.json");
    });
    it("returns a relative path with separators unchanged", () => {
        expect(resolveSaveStoragePath("subdir/storage.json", outputDir)).toBe("subdir/storage.json");
    });
    it("returns input unchanged when outputDir is undefined", () => {
        expect(resolveSaveStoragePath("auth.json", undefined)).toBe("auth.json");
    });
});
