You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
660 B
24 lines
660 B
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);
|
|
}
|
|
});
|
|
});
|