import { describe, expect, it } from "vitest";
import { listMockMothershipCandidates } from "@/modules/address/candidate-catalog";

describe("listMockMothershipCandidates", () => {
  it("Dallas 75201 返回 4 个 MotherShip 精确坐标", () => {
    const list = listMockMothershipCandidates({
      street: "5678 Distribution Dr",
      city: "Dallas",
      state: "TX",
      zip: "75201",
    });
    expect(list).toHaveLength(4);
    expect(list.map((c) => c.display_label)).toContain(
      "5678 Distribution Dr, Dallas, TX 75201",
    );
  });

  it("唯一候选时长度为 1", () => {
    const list = listMockMothershipCandidates({
      street: "99 Unknown Rd",
      city: "Austin",
      state: "TX",
      zip: "78701",
    });
    expect(list).toHaveLength(1);
  });
});
