Cover trimmed comma-separated If-Match tokens

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:35:48 +00:00
1 parent b520aa63f4
commit 482aeb7c57
1 file changed
+4
+4
View File
@@ -1028,6 +1028,10 @@ describe("ifMatchSatisfied", () => {
expect(ifMatchSatisfied("\"foo\", *", "\"abc\"")).toBe(true);
});
it("trims comma-separated header tokens before comparison", () => {
expect(ifMatchSatisfied(" \"foo\" , \"abc\" ", "\"abc\"")).toBe(true);
});
it("rejects weak validators and mismatches", () => {
expect(ifMatchSatisfied("W/\"abc\"", "\"abc\"")).toBe(false);
expect(ifMatchSatisfied("w/\"abc\"", "\"abc\"")).toBe(false);