mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:20:43 +00:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user