import { test } from "node:test";
import assert from "node:assert/strict";
import { formatForDisplay } from "@/features/opportunities/components/scheduleDateValues";

test("the organizer's date summary uses Latin digits in Arabic, like every other date on the site", () => {
  const out = formatForDisplay("2026-11-09", "ar");
  assert.match(out, /^[0-9]{2} \S+ 2026$/, out);
  assert.doesNotMatch(out, /[٠-٩۰-۹]/, "no Arabic-Indic numerals");
});

test("English keeps its own format", () => {
  assert.match(formatForDisplay("2026-11-09", "en"), /09 Nov 2026/);
});
