From 4b79ae7ad8f08a334bee67841cb1d050a5d1bf32 Mon Sep 17 00:00:00 2001 From: Shakker Date: Wed, 1 Apr 2026 19:55:01 +0100 Subject: [PATCH] test: trim provider usage auth normalization setup --- src/infra/provider-usage.auth.normalizes-keys.test.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/infra/provider-usage.auth.normalizes-keys.test.ts b/src/infra/provider-usage.auth.normalizes-keys.test.ts index c714b2f7cf0..85f69c4b120 100644 --- a/src/infra/provider-usage.auth.normalizes-keys.test.ts +++ b/src/infra/provider-usage.auth.normalizes-keys.test.ts @@ -205,6 +205,9 @@ describe("resolveProviderAuths key normalization", () => { beforeAll(async () => { suiteRoot = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-provider-auth-suite-")); + ({ resolveProviderAuths } = await import("./provider-usage.auth.js")); + ({ clearRuntimeAuthProfileStoreSnapshots } = await import("../agents/auth-profiles.js")); + ({ clearConfigCache, clearRuntimeConfigSnapshot } = await import("../config/config.js")); }); afterAll(async () => { @@ -213,11 +216,7 @@ describe("resolveProviderAuths key normalization", () => { suiteCase = 0; }); - beforeEach(async () => { - vi.resetModules(); - ({ resolveProviderAuths } = await import("./provider-usage.auth.js")); - ({ clearRuntimeAuthProfileStoreSnapshots } = await import("../agents/auth-profiles.js")); - ({ clearConfigCache, clearRuntimeConfigSnapshot } = await import("../config/config.js")); + beforeEach(() => { clearRuntimeConfigSnapshot(); clearConfigCache(); clearRuntimeAuthProfileStoreSnapshots();