import { consumeSavedSessionPath, setSavedSessionPath, } from "./sessionState.js";
describe("sessionState", () => {
    afterEach(() => {
        // Ensure module-level state is cleared between tests.
        setSavedSessionPath(undefined);
    });
    it("returns the set value on first consume and undefined on the second", () => {
        setSavedSessionPath("/abs/session.json");
        expect(consumeSavedSessionPath()).toBe("/abs/session.json");
        expect(consumeSavedSessionPath()).toBeUndefined();
    });
    it("setting undefined clears any prior value", () => {
        setSavedSessionPath("/abs/session.json");
        setSavedSessionPath(undefined);
        expect(consumeSavedSessionPath()).toBeUndefined();
    });
});
