From a league-management SaaS
it("rejects a cutoff date before the stored close date", async () => {
getSeason.mockResolvedValue({ id: "s1", closesOn: "2026-08-31", cutoffOn: null });
const result = await updateSeason("s1", { cutoffOn: "2026-08-15" });
expect(result).toEqual({ ok: false, error: "Cutoff cannot be before registration closes" });
expect(saveSeason).not.toHaveBeenCalled();
});