Cover If-Unmodified-Since array first-value precedence

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:16:28 +00:00
1 parent 95b52ecb47
commit 587cca9b84
1 file changed
+7
+7
View File
@@ -1075,6 +1075,13 @@ describe("ifUnmodifiedSinceSatisfied", () => {
ifUnmodifiedSinceSatisfied(["Thu, 01 Jan 2026 12:00:00 GMT", "Wed, 31 Dec 2025 12:00:00 GMT"], modifiedAt),
).toBe(true);
});
it("uses first array value even when later values differ", () => {
const modifiedAt = Date.parse("2026-01-01T12:00:01.000Z");
expect(
ifUnmodifiedSinceSatisfied(["Thu, 01 Jan 2026 12:00:00 GMT", "Thu, 01 Jan 2026 12:00:01 GMT"], modifiedAt),
).toBe(false);
});
});
describe("ifRangeSatisfied", () => {