mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 10:22:32 +00:00
15 lines
660 B
TypeScript
15 lines
660 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { __test__ } from "./register.thread.js";
|
|
|
|
describe("resolveThreadCreateAction", () => {
|
|
it("maps telegram thread create to topic-create", () => {
|
|
expect(__test__.resolveThreadCreateAction({ channel: "telegram" })).toBe("topic-create");
|
|
expect(__test__.resolveThreadCreateAction({ channel: " Telegram " })).toBe("topic-create");
|
|
});
|
|
|
|
it("keeps thread-create for non-telegram channels", () => {
|
|
expect(__test__.resolveThreadCreateAction({ channel: "discord" })).toBe("thread-create");
|
|
expect(__test__.resolveThreadCreateAction({ channel: undefined })).toBe("thread-create");
|
|
});
|
|
});
|