11 lines
398 B
TypeScript
11 lines
398 B
TypeScript
import { expect, test } from "bun:test";
|
|
import { isMonthId } from "./SummaryRoute.tsx";
|
|
|
|
test("Summary range accepts real months and rejects partial or impossible input", () => {
|
|
expect(isMonthId("2026-09")).toBe(true);
|
|
expect(isMonthId("")).toBe(false);
|
|
expect(isMonthId("2026-0")).toBe(false);
|
|
expect(isMonthId("2026-13")).toBe(false);
|
|
expect(isMonthId("2026-09-01")).toBe(false);
|
|
});
|