/* @vitest-environment node */

import { describe, it, expect } from "vitest";
import {
	isValidBranchParam,
	isValidYearParam,
	isValidMonthParam,
	isValidDayParam,
} from "./params.js";

describe("lib/frontend/params", () => {
	describe("isValidBranchParam", () => {
		it("accepts NL + digits", () => {
			expect(isValidBranchParam("NL01")).toBe(true);
			expect(isValidBranchParam("NL99")).toBe(true);
			expect(isValidBranchParam("NL200")).toBe(true);
		});

		it("rejects invalid branch values", () => {
			expect(isValidBranchParam("FOO")).toBe(false);
			expect(isValidBranchParam("nl01")).toBe(false);
			expect(isValidBranchParam("NL")).toBe(false);
			expect(isValidBranchParam("")).toBe(false);
			expect(isValidBranchParam(null)).toBe(false);
			expect(isValidBranchParam(undefined)).toBe(false);
		});
	});

	// year/month/day tests stay as-is...
});
