Cover If-Range array-first-value semantics

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:08:01 +00:00
1 parent fd1fbe45a7
commit 028a1786f7
1 file changed
+1
+1
View File
@@ -1092,6 +1092,7 @@ describe("ifRangeSatisfied", () => {
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(["\"etag\"", "\"other\""], "\"etag\"", modifiedAt)).toBe(true);
expect(ifRangeSatisfied("not-a-date", "\"etag\"", modifiedAt)).toBe(false);
});
});