mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:14:33 +00:00
refactor(agent): dedupe harness and command workflows
This commit is contained in:
14
src/agents/tools/web-fetch.test-mocks.ts
Normal file
14
src/agents/tools/web-fetch.test-mocks.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
// Avoid dynamic-importing heavy readability deps in unit test suites.
|
||||
vi.mock("./web-fetch-utils.js", async () => {
|
||||
const actual =
|
||||
await vi.importActual<typeof import("./web-fetch-utils.js")>("./web-fetch-utils.js");
|
||||
return {
|
||||
...actual,
|
||||
extractReadableContent: vi.fn().mockResolvedValue({
|
||||
title: "HTML Page",
|
||||
text: "HTML Page\n\nContent here.",
|
||||
}),
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user