refactor(test): share gateway e2e registry helper

This commit is contained in:
Peter Steinberger
2026-02-15 21:41:18 +00:00
parent 84601bf96b
commit c3812a1ffb
5 changed files with 21 additions and 55 deletions

View File

@@ -2,6 +2,7 @@ import { afterAll, beforeAll, describe, expect, test, vi } from "vitest";
import type { ChannelPlugin } from "../channels/plugins/types.js";
import type { PluginRegistry } from "../plugins/registry.js";
import { setActivePluginRegistry } from "../plugins/runtime.js";
import { createRegistry } from "./server.e2e-registry-helpers.js";
import {
connectOk,
installGatewayTestHooks,
@@ -41,19 +42,6 @@ vi.mock("./server-plugins.js", async () => {
};
});
const createRegistry = (channels: PluginRegistry["channels"]): PluginRegistry => ({
plugins: [],
tools: [],
channels,
providers: [],
gatewayHandlers: {},
httpHandlers: [],
httpRoutes: [],
cliRegistrars: [],
services: [],
diagnostics: [],
});
const createStubChannelPlugin = (params: {
id: ChannelPlugin["id"];
label: string;