Files
openclaw/test/web-fetch-provider-boundary.test.ts
Vincent Koc 6eca1949d5 refactor(plugins): tighten web fetch provider boundary (#59646)
* refactor(plugins): tighten web fetch provider boundary

* fix(config): sync fetch secret parity and baseline

* fix(ci): enforce web fetch boundary guard
2026-04-02 20:53:57 +09:00

32 lines
998 B
TypeScript

import { describe, expect, it } from "vitest";
import {
collectWebFetchProviderBoundaryViolations,
main,
} from "../scripts/check-web-fetch-provider-boundaries.mjs";
import { createCapturedIo } from "./helpers/captured-io.js";
const violationsPromise = collectWebFetchProviderBoundaryViolations();
const jsonOutputPromise = getJsonOutput();
async function getJsonOutput() {
const captured = createCapturedIo();
const exitCode = await main(["--json"], captured.io);
return {
exitCode,
stderr: captured.readStderr(),
json: JSON.parse(captured.readStdout()),
};
}
describe("web fetch provider boundary inventory", () => {
it("keeps Firecrawl-specific fetch logic out of core runtime/tooling", async () => {
const violations = await violationsPromise;
const jsonOutput = await jsonOutputPromise;
expect(violations).toEqual([]);
expect(jsonOutput.exitCode).toBe(0);
expect(jsonOutput.stderr).toBe("");
expect(jsonOutput.json).toEqual([]);
});
});