mirror of
https://github.com/alexgetmancom/miband-bot.git
synced 2026-09-05 18:16:18 +03:00
rewrite bot in TypeScript and add locale switching
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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%");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user