Skip to content
Myr

format-ordinal.test.ts

This file

Path

examples/datekit/test/asks/format-ordinal.test.ts

22 lines · 470 bytes · TypeScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–22why, one step back
1import { expect, test } from "bun:test";
23import { format } from "../../src/index.ts";45test("format's Do token prints English ordinals, the teens included", () => {6 const days = [1, 2, 3, 4, 11, 12, 13, 14, 21, 22, 23, 31];78 expect(days.map((day) => format(new Date(Date.UTC(2026, 0, day)), "Do"))).toStrictEqual([9 "1st",10 "2nd",11 "3rd",12 "4th",13 "11th",14 "12th",15 "13th",16 "14th",17 "21st",18 "22nd",19 "23rd",20 "31st",21 ]);22});