import { describe, expect, it } from "vitest";
import { resolveLicitayaState } from "@/lib/licitations/licitaya-state";

describe("resolveLicitayaState", () => {
  it("maps LicitaYa state tokens to internal state codes", () => {
    expect(resolveLicitayaState("NLE")).toMatchObject({ stateCode: "19" });
    expect(resolveLicitayaState("cdmx")).toMatchObject({ stateCode: "9" });
  });

  it("returns null for unknown tokens", () => {
    expect(resolveLicitayaState("XX")).toBeNull();
    expect(resolveLicitayaState(null)).toBeNull();
  });
});
