diff --git a/test/helpers/channels/surface-contract-registry.ts b/test/helpers/channels/surface-contract-registry.ts index df60f701fd6..b1a00cdb404 100644 --- a/test/helpers/channels/surface-contract-registry.ts +++ b/test/helpers/channels/surface-contract-registry.ts @@ -1,4 +1,3 @@ -import { vi } from "vitest"; import { listBundledChannelPlugins, setBundledChannelRuntime, @@ -12,10 +11,6 @@ import { } from "../../../src/plugin-sdk/line.js"; import { channelPluginSurfaceKeys, type ChannelPluginSurface } from "./manifest.js"; -function buildBundledPluginModuleId(pluginId: string, artifactBasename: string): string { - return ["..", "..", "..", "extensions", pluginId, artifactBasename].join("/"); -} - type SurfaceContractEntry = { id: string; plugin: Pick< @@ -46,13 +41,6 @@ type DirectoryContractEntry = { accountId?: string; }; -const sendMessageMatrixMock = vi.hoisted(() => - vi.fn(async (to: string, _message: string, opts?: { threadId?: string }) => ({ - messageId: opts?.threadId ? "$matrix-thread" : "$matrix-root", - roomId: to.replace(/^room:/, ""), - })), -); - setBundledChannelRuntime("line", { channel: { line: { @@ -64,15 +52,6 @@ setBundledChannelRuntime("line", { }, } as never); -vi.mock(buildBundledPluginModuleId("matrix", "runtime-api.js"), async () => { - const matrixRuntimeApiModuleId = buildBundledPluginModuleId("matrix", "runtime-api.js"); - const actual = await vi.importActual(matrixRuntimeApiModuleId); - return { - ...actual, - sendMessageMatrix: sendMessageMatrixMock, - }; -}); - let surfaceContractRegistryCache: SurfaceContractEntry[] | undefined; let threadingContractRegistryCache: ThreadingContractEntry[] | undefined; let directoryContractRegistryCache: DirectoryContractEntry[] | undefined;