From 56bb28267d93445eef11b6ce889e96dd2fdedb5f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 03:18:47 +0000 Subject: [PATCH] Expand If-Range helper edge-case coverage Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 9e51d9b49b..38948742b1 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -1007,6 +1007,12 @@ describe("ifRangeSatisfied", () => { ifRangeSatisfied("Thu, 01 Jan 2026 11:59:59 GMT", "\"etag\"", Date.parse("2026-01-01T12:00:01.000Z")), ).toBe(false); }); + + it("supports array-valued headers and rejects invalid date forms", () => { + const modifiedAt = Date.parse("2026-01-01T12:00:00.000Z"); + expect(ifRangeSatisfied(["\"etag\""], "\"etag\"", modifiedAt)).toBe(true); + expect(ifRangeSatisfied("not-a-date", "\"etag\"", modifiedAt)).toBe(false); + }); }); describe("resolveStaticAssetReadTarget", () => {