Cover comma-separated If-Match value parsing

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:03:04 +00:00
1 parent ae24ea691c
commit a80816d86c
1 file changed
+5
+5
View File
@@ -992,6 +992,11 @@ describe("ifMatchSatisfied", () => {
expect(ifMatchSatisfied("\"abc\"", "\"abc\"")).toBe(true);
});
it("supports comma-separated header values", () => {
expect(ifMatchSatisfied("\"foo\", \"abc\"", "\"abc\"")).toBe(true);
expect(ifMatchSatisfied("\"foo\", *", "\"abc\"")).toBe(true);
});
it("rejects weak validators and mismatches", () => {
expect(ifMatchSatisfied("W/\"abc\"", "\"abc\"")).toBe(false);
expect(ifMatchSatisfied("\"xyz\"", "\"abc\"")).toBe(false);