From 4cf31767b99a20f7c60c4b4eea4100583162bbad Mon Sep 17 00:00:00 2001 From: Shakker Date: Sat, 9 May 2026 17:17:54 +0100 Subject: [PATCH] test: reuse nodes utils import --- src/agents/tools/nodes-utils.test.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/agents/tools/nodes-utils.test.ts b/src/agents/tools/nodes-utils.test.ts index de7a72c95ca..f81e188c9e2 100644 --- a/src/agents/tools/nodes-utils.test.ts +++ b/src/agents/tools/nodes-utils.test.ts @@ -1,4 +1,4 @@ -import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { beforeEach, describe, expect, it, vi } from "vitest"; const gatewayMocks = vi.hoisted(() => ({ callGatewayTool: vi.fn(), @@ -8,9 +8,7 @@ vi.mock("./gateway.js", () => ({ })); import type { NodeListNode } from "./nodes-utils.js"; - -let listNodes: typeof import("./nodes-utils.js").listNodes; -let resolveNodeIdFromList: typeof import("./nodes-utils.js").resolveNodeIdFromList; +import { listNodes, resolveNodeIdFromList } from "./nodes-utils.js"; function node({ nodeId, ...overrides }: Partial & { nodeId: string }): NodeListNode { return { @@ -21,10 +19,6 @@ function node({ nodeId, ...overrides }: Partial & { nodeId: string }; } -beforeAll(async () => { - ({ listNodes, resolveNodeIdFromList } = await import("./nodes-utils.js")); -}); - beforeEach(() => { gatewayMocks.callGatewayTool.mockReset(); });