mirror of
https://github.com/alexgetmancom/miband-bot.git
synced 2026-09-05 18:16:18 +03:00
11 lines
404 B
TypeScript
11 lines
404 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { esc, minutes, stepBar } from "../src/bot/formatting.js";
|
|
|
|
describe("bot formatting", () => {
|
|
test("escapes Telegram HTML and formats health values", () => {
|
|
expect(esc('<secret> & "value"')).toBe("<secret> & "value"");
|
|
expect(minutes(396)).toBe("6 h 36 min");
|
|
expect(stepBar(5000)).toContain("50%");
|
|
});
|
|
});
|