From 8d7a7224875131b48c8420f11d15631a11cd9a81 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Fri, 17 Apr 2026 12:37:56 -0400 Subject: [PATCH] Tests: register models command text surfaces Keep models command tests inside the in-memory channel registry for Discord and WhatsApp so text-surface assertions do not load bundled channel runtimes. --- src/auto-reply/reply/commands-models.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/auto-reply/reply/commands-models.test.ts b/src/auto-reply/reply/commands-models.test.ts index 8b7865e7fc7..39c959ddd0b 100644 --- a/src/auto-reply/reply/commands-models.test.ts +++ b/src/auto-reply/reply/commands-models.test.ts @@ -54,6 +54,12 @@ const telegramModelsTestPlugin: ChannelPlugin = { }, }; +const textSurfaceModelsTestPlugins = (["discord", "whatsapp"] as const).map((id) => ({ + pluginId: id, + plugin: createChannelTestPluginBase({ id }), + source: "test", +})); + beforeEach(() => { modelCatalogMocks.loadModelCatalog.mockReset(); modelCatalogMocks.loadModelCatalog.mockResolvedValue([ @@ -67,6 +73,7 @@ beforeEach(() => { modelAuthLabelMocks.resolveModelAuthLabel.mockReturnValue(undefined); setActivePluginRegistry( createTestRegistry([ + ...textSurfaceModelsTestPlugins, { pluginId: "telegram", plugin: telegramModelsTestPlugin,