20 lines
571 B
TypeScript
20 lines
571 B
TypeScript
import { describe, it } from "@std/testing/bdd";
|
|
import { expect } from "@std/expect";
|
|
import { localizeDate } from "../dates.ts";
|
|
|
|
describe("Dates", () => {
|
|
describe("#localizeDate", () => {
|
|
it("returns a human-readable date for timestamp", () => {
|
|
const date = localizeDate(1726402055);
|
|
expect(date).toEqual("September 15, 2024");
|
|
});
|
|
});
|
|
|
|
describe("#isoDate", () => {
|
|
it("returns an ISO 8601 date for the timestamp", () => {
|
|
const date = localizeDate(1726402055);
|
|
expect(date).toEqual("September 15, 2024");
|
|
});
|
|
});
|
|
});
|