From 0311e172e00b0819d002f498222db2b8d8e190d1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 28 Apr 2026 20:19:51 +0100 Subject: [PATCH] test: preserve bundled dir fixture helpers --- src/config/plugin-auto-enable.prefer-over.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/config/plugin-auto-enable.prefer-over.test.ts b/src/config/plugin-auto-enable.prefer-over.test.ts index be5253a793e..75f4239b86d 100644 --- a/src/config/plugin-auto-enable.prefer-over.test.ts +++ b/src/config/plugin-auto-enable.prefer-over.test.ts @@ -4,10 +4,14 @@ import { afterEach, describe, expect, it, vi } from "vitest"; import type { PluginManifestRegistry } from "../plugins/manifest-registry.js"; import { cleanupTrackedTempDirs } from "../plugins/test-helpers/fs-fixtures.js"; -vi.mock("../plugins/bundled-dir.js", () => ({ - resolveBundledPluginsDir: (env: NodeJS.ProcessEnv = process.env) => - env.OPENCLAW_BUNDLED_PLUGINS_DIR, -})); +vi.mock("../plugins/bundled-dir.js", async (importOriginal) => { + const actual = await importOriginal(); + return { + ...actual, + resolveBundledPluginsDir: (env: NodeJS.ProcessEnv = process.env) => + env.OPENCLAW_BUNDLED_PLUGINS_DIR, + }; +}); const tempDirs: string[] = [];