test: stabilize env-dependent tool defaults

This commit is contained in:
Peter Steinberger
2026-01-18 01:57:44 +00:00
parent 8013c4717c
commit 005b831023
2 changed files with 2 additions and 1 deletions

View File

@@ -91,7 +91,7 @@ describe("nodes run", () => {
it("passes invoke and command timeouts", async () => {
callGateway.mockImplementation(async ({ method, params }) => {
if (method === "node.list") {
return { nodes: [{ nodeId: "mac-1" }] };
return { nodes: [{ nodeId: "mac-1", commands: ["system.run"] }] };
}
if (method === "node.invoke") {
expect(params).toMatchObject({

View File

@@ -122,6 +122,7 @@ describe("web_search perplexity baseUrl defaults", () => {
});
it("defaults to OpenRouter when OPENROUTER_API_KEY is set", async () => {
vi.stubEnv("PERPLEXITY_API_KEY", "");
vi.stubEnv("OPENROUTER_API_KEY", "sk-or-test");
const mockFetch = vi.fn(() =>
Promise.resolve({