mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
cb52ded58d
* refactor(telegram): split native commands by executor * refactor(telegram): deduplicate DM-thread target session * chore(lint): ratchet max-lines baseline after telegram commands split * test(telegram): fix native command split checks
12 lines
664 B
TypeScript
12 lines
664 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { parseTelegramNativeCommandCallbackData } from "./native-command-callback-data.js";
|
|
|
|
describe("parseTelegramNativeCommandCallbackData", () => {
|
|
it("preserves prefixed native commands and rejects malformed command bodies", () => {
|
|
expect(parseTelegramNativeCommandCallbackData("tgcmd:/fast status")).toBe("/fast status");
|
|
expect(parseTelegramNativeCommandCallbackData("tgcmd:/fast auto")).toBe("/fast auto");
|
|
expect(parseTelegramNativeCommandCallbackData("tgcmd:/fast default")).toBe("/fast default");
|
|
expect(parseTelegramNativeCommandCallbackData("tgcmd:fast status")).toBeNull();
|
|
});
|
|
});
|