feat: improve profile navigation and responsive privacy UX
This commit is contained in:
11
tests/digits.test.mjs
Normal file
11
tests/digits.test.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { toEnglishDigits } from "../src/lib/digits.ts";
|
||||
|
||||
test("normalizes Persian and Arabic-Indic digits to English digits", () => {
|
||||
assert.equal(toEnglishDigits("۱۴۰۱ ١٢٣ 456"), "1401 123 456");
|
||||
});
|
||||
|
||||
test("keeps non-digit characters unchanged", () => {
|
||||
assert.equal(toEnglishDigits("۰۹۳۸-abc"), "0938-abc");
|
||||
});
|
||||
Reference in New Issue
Block a user