Cover comma-separated If-Match value parsing
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
ae24ea691c
commit
a80816d86c
1 file changed
+5
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user