test: stabilize env-dependent tool defaults
This commit is contained in:
@@ -91,7 +91,7 @@ describe("nodes run", () => {
|
|||||||
it("passes invoke and command timeouts", async () => {
|
it("passes invoke and command timeouts", async () => {
|
||||||
callGateway.mockImplementation(async ({ method, params }) => {
|
callGateway.mockImplementation(async ({ method, params }) => {
|
||||||
if (method === "node.list") {
|
if (method === "node.list") {
|
||||||
return { nodes: [{ nodeId: "mac-1" }] };
|
return { nodes: [{ nodeId: "mac-1", commands: ["system.run"] }] };
|
||||||
}
|
}
|
||||||
if (method === "node.invoke") {
|
if (method === "node.invoke") {
|
||||||
expect(params).toMatchObject({
|
expect(params).toMatchObject({
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ describe("web_search perplexity baseUrl defaults", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("defaults to OpenRouter when OPENROUTER_API_KEY is set", async () => {
|
it("defaults to OpenRouter when OPENROUTER_API_KEY is set", async () => {
|
||||||
|
vi.stubEnv("PERPLEXITY_API_KEY", "");
|
||||||
vi.stubEnv("OPENROUTER_API_KEY", "sk-or-test");
|
vi.stubEnv("OPENROUTER_API_KEY", "sk-or-test");
|
||||||
const mockFetch = vi.fn(() =>
|
const mockFetch = vi.fn(() =>
|
||||||
Promise.resolve({
|
Promise.resolve({
|
||||||
|
|||||||
Reference in New Issue
Block a user