mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-20 21:51:28 +00:00
test(msteams): slim messenger runtime fixtures
This commit is contained in:
@@ -2,7 +2,7 @@ import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createPluginRuntimeMock } from "../../../test/helpers/plugins/plugin-runtime-mock.js";
|
||||
import { resolvePreferredOpenClawTmpDir } from "../../../src/infra/tmp-openclaw-dir.js";
|
||||
import { SILENT_REPLY_TOKEN, type PluginRuntime } from "../runtime-api.js";
|
||||
import type { StoredConversationReference } from "./conversation-store.js";
|
||||
const graphUploadMockState = vi.hoisted(() => ({
|
||||
@@ -17,7 +17,6 @@ vi.mock("./graph-upload.js", async () => {
|
||||
};
|
||||
});
|
||||
|
||||
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
||||
import {
|
||||
type MSTeamsAdapter,
|
||||
type MSTeamsRenderedMessage,
|
||||
@@ -41,7 +40,10 @@ const chunkMarkdownText = (text: string, limit: number) => {
|
||||
return chunks;
|
||||
};
|
||||
|
||||
const runtimeStub: PluginRuntime = createPluginRuntimeMock({
|
||||
const runtimeStub = {
|
||||
config: {
|
||||
loadConfig: () => ({}),
|
||||
},
|
||||
channel: {
|
||||
text: {
|
||||
chunkMarkdownText,
|
||||
@@ -50,7 +52,7 @@ const runtimeStub: PluginRuntime = createPluginRuntimeMock({
|
||||
convertMarkdownTables: (text: string) => text,
|
||||
},
|
||||
},
|
||||
});
|
||||
} as unknown as PluginRuntime;
|
||||
|
||||
const noopUpdateActivity = async () => {};
|
||||
const noopDeleteActivity = async () => {};
|
||||
|
||||
Reference in New Issue
Block a user