mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-29 08:43:37 +00:00
12 lines
515 B
TypeScript
12 lines
515 B
TypeScript
// Telegram tests cover channel config api plugin behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import { TELEGRAM_COMMAND_NAME_PATTERN } from "./channel-config-api.js";
|
|
|
|
describe("telegram channel config api", () => {
|
|
it("exports the Telegram command regex", () => {
|
|
expect(TELEGRAM_COMMAND_NAME_PATTERN.toString()).toBe("/^[a-z0-9_]{1,32}$/");
|
|
expect(TELEGRAM_COMMAND_NAME_PATTERN.test("hello_world")).toBe(true);
|
|
expect(TELEGRAM_COMMAND_NAME_PATTERN.test("Hello")).toBe(false);
|
|
});
|
|
});
|