Skip to content

Commit 38c1139

Browse files
committed
test(plugins): keep empty registry imports lightweight
1 parent 6a5ab72 commit 38c1139

9 files changed

Lines changed: 17 additions & 9 deletions

File tree

src/flows/channel-setup.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Channel setup tests cover setup flow prompts and config output.
22
import { beforeEach, describe, expect, it, vi } from "vitest";
33
import type { OpenClawConfig } from "../config/types.openclaw.js";
4-
import { createEmptyPluginRegistry } from "../plugins/registry.js";
4+
import { createEmptyPluginRegistry } from "../plugins/registry-empty.js";
55
import {
66
makeCatalogEntry,
77
makeChannelSetupEntries,

src/gateway/server-plugins.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
44
import { createPluginRecord } from "../plugins/loader-records.js";
55
import type { PluginLookUpTable } from "../plugins/plugin-lookup-table.js";
6-
import { createEmptyPluginRegistry, type PluginRegistry } from "../plugins/registry.js";
6+
import { createEmptyPluginRegistry } from "../plugins/registry-empty.js";
7+
import type { PluginRegistry } from "../plugins/registry.js";
78
import type { PluginRuntimeGatewayRequestScope } from "../plugins/runtime/gateway-request-scope.js";
89
import type { PluginRuntime } from "../plugins/runtime/types.js";
910
import type { PluginDiagnostic } from "../plugins/types.js";

src/gateway/server/__tests__/test-utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Gateway server test utilities build plugin-registry fixtures for nested server suites.
2-
import { createEmptyPluginRegistry, type PluginRegistry } from "../../../plugins/registry.js";
2+
import { createEmptyPluginRegistry } from "../../../plugins/registry-empty.js";
3+
import type { PluginRegistry } from "../../../plugins/registry.js";
34

45
/**
56
* Shared plugin-registry fixtures for gateway server tests.

src/gateway/server/plugins-http/route-capability.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Plugin node-capability route matching and surface listing tests.
33
*/
44
import { describe, expect, it } from "vitest";
5-
import { createEmptyPluginRegistry, type PluginRegistry } from "../../../plugins/registry.js";
5+
import { createEmptyPluginRegistry } from "../../../plugins/registry-empty.js";
6+
import type { PluginRegistry } from "../../../plugins/registry.js";
67
import { resolvePluginRoutePathContext } from "./path-context.js";
78
import {
89
findMatchingPluginNodeCapabilityRoute,

src/gateway/test-helpers.plugin-registry.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Plugin registry test helpers provide a process-wide stub registry with default
22
// channel and speech providers for gateway suites.
3-
import { createEmptyPluginRegistry, type PluginRegistry } from "../plugins/registry.js";
3+
import { createEmptyPluginRegistry } from "../plugins/registry-empty.js";
4+
import type { PluginRegistry } from "../plugins/registry.js";
45
import { setActivePluginRegistry } from "../plugins/runtime.js";
56
import { resolveGlobalSingleton } from "../shared/global-singleton.js";
67
import { createDefaultGatewayTestChannels } from "./test-helpers.channels.js";

src/plugins/hooks.test-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Provides shared helpers for plugin hook tests.
22
import { uniqueStrings } from "@openclaw/normalization-core/string-normalization";
33
import { createHookRunner } from "./hooks.js";
4-
import { createEmptyPluginRegistry, type PluginRegistry } from "./registry.js";
4+
import { createEmptyPluginRegistry } from "./registry-empty.js";
5+
import type { PluginRegistry } from "./registry.js";
56
import { createPluginRecord } from "./status.test-helpers.js";
67
import type { PluginHookAgentContext, PluginHookRegistration } from "./types.js";
78

src/plugins/status.test-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** Shared helpers for plugin status tests and installed-index fixture setup. */
22
import type { PluginLoadResult } from "./loader.js";
3-
import { createEmptyPluginRegistry, type PluginRecord } from "./registry.js";
3+
import { createEmptyPluginRegistry } from "./registry-empty.js";
4+
import type { PluginRecord } from "./registry.js";
45
import type { PluginCompatibilityNotice } from "./status.js";
56
import type { PluginHookName } from "./types.js";
67

src/test-utils/channel-plugins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import type {
66
ChannelOutboundAdapter,
77
ChannelPlugin,
88
} from "../channels/plugins/types.public.js";
9-
import { createEmptyPluginRegistry, type PluginRegistry } from "../plugins/registry.js";
9+
import { createEmptyPluginRegistry } from "../plugins/registry-empty.js";
10+
import type { PluginRegistry } from "../plugins/registry.js";
1011

1112
/** Registry entry shape used by channel tests without loading real plugins. */
1213
export type TestChannelRegistration = {

test/setup-openclaw-runtime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import type {
77
} from "../src/channels/plugins/types.js";
88
import type { OpenClawConfig } from "../src/config/config.js";
99
import type { OutboundSendDeps } from "../src/infra/outbound/deliver.js";
10-
import { createEmptyPluginRegistry, type PluginRegistry } from "../src/plugins/registry.js";
10+
import { createEmptyPluginRegistry } from "../src/plugins/registry-empty.js";
11+
import type { PluginRegistry } from "../src/plugins/registry.js";
1112
import { installSharedTestSetup } from "./setup.shared.js";
1213

1314
installSharedTestSetup();

0 commit comments

Comments
 (0)