From ba1e8845b19146256acd5b4c2e949462dee702eb Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Fri, 30 Oct 2026 09:36:47 +0000 Subject: [PATCH] Fix central-alerts cache-reuse test for Hono encoded query order Hono 4.13.14 (honojs/hono#5495) fixed req.query() skipping an earlier encoded duplicate, so ?%6cimit=2&limit=1 now resolves to limit=2 (first-wins in string order) instead of limit=1. Update the ?limit=1 cache-reuse variants to use encoded-first value 1, and add a ?limit=2 case locking the corrected duplicate resolution. --- test/services/central-alerts/v1/index.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/services/central-alerts/v1/index.test.ts b/test/services/central-alerts/v1/index.test.ts index ba3bee36..b4b17903 100644 --- a/test/services/central-alerts/v1/index.test.ts +++ b/test/services/central-alerts/v1/index.test.ts @@ -99,10 +99,16 @@ describe("Central Alerts API v1", () => { "?limit=0x1&offset=-1", "?limit=%201%20&offset=0.0", "?%6cimit=1", - "?%6cimit=2&limit=1", + // Since hono#5495, encoded duplicates keep their string position + // and params resolve first-wins, so the encoded 1 wins here. + "?%6cimit=1&limit=2", "?limit=1&limit=2" ] }, + { + initial: "?limit=2", + variants: ["?%6cimit=2&limit=1", "?limit=2.0"] + }, { initial: "?limit=2&offset=1", variants: ["?offset=01&nonce=one&limit=2.0", "?limit=2&offset=1e0"]