rewrite bot in TypeScript and add locale switching

This commit is contained in:
Alex Getman
2026-08-12 13:12:04 +03:00
parent 905b69f568
commit 2cb8740e06
121 changed files with 5230 additions and 15333 deletions
+10
View File
@@ -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("&lt;secret&gt; &amp; &quot;value&quot;");
expect(minutes(396)).toBe("6 h 36 min");
expect(stepBar(5000)).toContain("50%");
});
});