import { describe, expect, it } from "vitest";
import {
  COLLECT_CLIENT_STATE,
  FILL_CARGO_FIELD,
  PROBE_CARGO_UI,
  WAIT_CARGO_INTERACTIVE,
} from "@/workers/rpa/kernel/browser-scripts";

describe("kernel/browser-scripts re-exports", () => {
  it("脚本为纯字符串，不含 TS helper 引用", () => {
    const scripts = [
      PROBE_CARGO_UI,
      WAIT_CARGO_INTERACTIVE,
      FILL_CARGO_FIELD,
      COLLECT_CLIENT_STATE,
    ];
    for (const script of scripts) {
      expect(script).not.toMatch(/__name|__assign|__awaiter|__spread/);
      expect(typeof script).toBe("string");
      expect(script.length).toBeGreaterThan(10);
    }
  });
});
