From ab400664bd8fc63f9dccb3e1ce63d376a104e600 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:13:24 +0000 Subject: [PATCH] Expand ETag precondition helper edge-case tests Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 25c42984c5..a882c2b0d9 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -969,6 +969,10 @@ describe("ifNoneMatchSatisfied", () => { expect(ifNoneMatchSatisfied(" ", "\"abc\"")).toBe(false); }); + it("supports wildcard in array-valued headers", () => { + expect(ifNoneMatchSatisfied(["\"foo\"", "*"], "\"abc\"")).toBe(true); + }); + it("matches wildcard headers", () => { expect(ifNoneMatchSatisfied("*", "\"abc\"")).toBe(true); }); @@ -997,6 +1001,10 @@ describe("ifMatchSatisfied", () => { expect(ifMatchSatisfied(undefined, "\"abc\"")).toBe(true); }); + it("treats empty header values as non-restrictive", () => { + expect(ifMatchSatisfied(" ", "\"abc\"")).toBe(true); + }); + it("supports wildcard and exact strong matches", () => { expect(ifMatchSatisfied("*", "\"abc\"")).toBe(true); expect(ifMatchSatisfied("\"abc\"", "\"abc\"")).toBe(true);