From b520fc408f37614aca38b8fc332762428c7a2304 Mon Sep 17 00:00:00 2001 From: kriptoburak Date: Thu, 2 Jul 2026 19:25:06 +0300 Subject: [PATCH] test: cover Xquik API key headers --- packages/typescript-fetch-runtime/src/main.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/typescript-fetch-runtime/src/main.spec.ts b/packages/typescript-fetch-runtime/src/main.spec.ts index 29e78051..d0fac12b 100644 --- a/packages/typescript-fetch-runtime/src/main.spec.ts +++ b/packages/typescript-fetch-runtime/src/main.spec.ts @@ -162,6 +162,20 @@ describe("typescript-fetch-runtime/main", () => { }) describe("route headers", () => { + it("preserves Xquik API key header names", () => { + const actual = getActual({ + defaultHeaders: {Accept: "application/json"}, + routeHeaders: {"x-api-key": "test-key"}, + configHeaders: {"Xquik-Api-Key": "alias-key"}, + }) + + expect(Array.from(actual.entries())).toStrictEqual([ + ["accept", "application/json"], + ["x-api-key", "test-key"], + ["xquik-api-key", "alias-key"], + ]) + }) + it("applies number route headers", () => { const actual = getActual({ routeHeaders: {"X-Rate-Limit": 10},