2026-01-15 05:03:50 +00:00
|
|
|
import type { PluginRegistry } from "../../../plugins/registry.js";
|
|
|
|
|
|
2026-01-15 05:17:03 +00:00
|
|
|
export const createTestRegistry = (overrides: Partial<PluginRegistry> = {}): PluginRegistry => {
|
2026-01-15 05:03:50 +00:00
|
|
|
const base: PluginRegistry = {
|
|
|
|
|
plugins: [],
|
|
|
|
|
tools: [],
|
2026-01-18 05:56:59 +00:00
|
|
|
hooks: [],
|
2026-01-18 05:40:58 +00:00
|
|
|
typedHooks: [],
|
2026-01-15 05:03:50 +00:00
|
|
|
channels: [],
|
2026-01-16 03:15:07 +00:00
|
|
|
providers: [],
|
2026-01-15 05:03:50 +00:00
|
|
|
gatewayHandlers: {},
|
|
|
|
|
httpHandlers: [],
|
2026-01-25 07:22:36 -05:00
|
|
|
httpRoutes: [],
|
2026-01-15 05:03:50 +00:00
|
|
|
cliRegistrars: [],
|
|
|
|
|
services: [],
|
2026-01-23 03:17:10 +00:00
|
|
|
commands: [],
|
2026-01-15 05:03:50 +00:00
|
|
|
diagnostics: [],
|
|
|
|
|
};
|
|
|
|
|
const merged = { ...base, ...overrides };
|
|
|
|
|
return {
|
|
|
|
|
...merged,
|
|
|
|
|
gatewayHandlers: merged.gatewayHandlers ?? {},
|
|
|
|
|
httpHandlers: merged.httpHandlers ?? [],
|
2026-01-25 07:22:36 -05:00
|
|
|
httpRoutes: merged.httpRoutes ?? [],
|
2026-01-15 05:03:50 +00:00
|
|
|
};
|
|
|
|
|
};
|