From 6b9ebffebb00aabae5b14f617a7fb1f3d9abb111 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Thu, 19 Mar 2026 11:08:02 -0700 Subject: [PATCH] test(ci): trim command secret gateway harness churn --- src/cli/command-secret-gateway.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/command-secret-gateway.test.ts b/src/cli/command-secret-gateway.test.ts index 3d1db95891a..a322b1853cd 100644 --- a/src/cli/command-secret-gateway.test.ts +++ b/src/cli/command-secret-gateway.test.ts @@ -1,4 +1,4 @@ -import { beforeEach, describe, expect, it, vi } from "vitest"; +import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; const callGateway = vi.fn(); @@ -9,12 +9,14 @@ vi.mock("../gateway/call.js", () => ({ let resolveCommandSecretRefsViaGateway: typeof import("./command-secret-gateway.js").resolveCommandSecretRefsViaGateway; -beforeEach(async () => { - vi.resetModules(); - callGateway.mockReset(); +beforeAll(async () => { ({ resolveCommandSecretRefsViaGateway } = await import("./command-secret-gateway.js")); }); +beforeEach(() => { + callGateway.mockReset(); +}); + describe("resolveCommandSecretRefsViaGateway", () => { function makeTalkApiKeySecretRefConfig(envKey: string): OpenClawConfig { return {