mirror of https://github.com/openclaw/openclaw.git
24 lines
743 B
TypeScript
24 lines
743 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { createWebFetchTool, createWebSearchTool } from "./web-tools.js";
|
|
|
|
describe("web tools defaults", () => {
|
|
it("enables web_fetch by default (non-sandbox)", () => {
|
|
const tool = createWebFetchTool({ config: {}, sandboxed: false });
|
|
expect(tool?.name).toBe("web_fetch");
|
|
});
|
|
|
|
it("disables web_fetch when explicitly disabled", () => {
|
|
const tool = createWebFetchTool({
|
|
config: { tools: { web: { fetch: { enabled: false } } } },
|
|
sandboxed: false,
|
|
});
|
|
expect(tool).toBeNull();
|
|
});
|
|
|
|
it("enables web_search by default", () => {
|
|
const tool = createWebSearchTool({ config: {}, sandboxed: false });
|
|
expect(tool?.name).toBe("web_search");
|
|
});
|
|
});
|