test: preserve bundled dir fixture helpers · openclaw/openclaw@0311e17
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,14 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
4 | 4 | import type { PluginManifestRegistry } from "../plugins/manifest-registry.js"; |
5 | 5 | import { cleanupTrackedTempDirs } from "../plugins/test-helpers/fs-fixtures.js"; |
6 | 6 | |
7 | | -vi.mock("../plugins/bundled-dir.js", () => ({ |
8 | | -resolveBundledPluginsDir: (env: NodeJS.ProcessEnv = process.env) => |
9 | | -env.OPENCLAW_BUNDLED_PLUGINS_DIR, |
10 | | -})); |
| 7 | +vi.mock("../plugins/bundled-dir.js", async (importOriginal) => { |
| 8 | +const actual = await importOriginal<typeof import("../plugins/bundled-dir.js")>(); |
| 9 | +return { |
| 10 | + ...actual, |
| 11 | +resolveBundledPluginsDir: (env: NodeJS.ProcessEnv = process.env) => |
| 12 | +env.OPENCLAW_BUNDLED_PLUGINS_DIR, |
| 13 | +}; |
| 14 | +}); |
11 | 15 | |
12 | 16 | const tempDirs: string[] = []; |
13 | 17 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。