mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 16:40:26 +00:00
Extensions: stabilize telegram registry contracts
This commit is contained in:
@@ -4,6 +4,7 @@ import path from "node:path";
|
||||
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { loadBundledPluginTestApiSync } from "../../../src/test-utils/bundled-plugin-public-surface.js";
|
||||
import { importFreshModule } from "../../../test/helpers/import-fresh.js";
|
||||
import {
|
||||
__testing,
|
||||
@@ -172,6 +173,14 @@ describe("telegram thread bindings", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("exposes the reset helper through the bundled test api", async () => {
|
||||
const { resetTelegramThreadBindingsForTests } = loadBundledPluginTestApiSync<{
|
||||
resetTelegramThreadBindingsForTests: () => Promise<void>;
|
||||
}>("telegram");
|
||||
|
||||
await expect(resetTelegramThreadBindingsForTests()).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
it("does not persist lifecycle updates when manager persistence is disabled", async () => {
|
||||
stateDirOverride = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-telegram-bindings-"));
|
||||
process.env.OPENCLAW_STATE_DIR = stateDirOverride;
|
||||
|
||||
Reference in New Issue
Block a user