import { describe, expect, it } from "vitest";
import { widgetHasFreightSummary } from "@/workers/rpa/cargo-reset";

describe("widgetHasFreightSummary", () => {
  it("含托盘+尺寸摘要 → true", () => {
    expect(
      widgetHasFreightSummary(
        "2 托盘s 40W, x 48L, x 44H, x 2079Lbs",
      ),
    ).toBe(true);
  });

  it("仅地址无货物 → false", () => {
    expect(
      widgetHasFreightSummary("Denver, CO Charlotte, NC 4800 South Race Street"),
    ).toBe(false);
  });
});
