From 332ee26de2d279377c01a040aae0d993c0699309 Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Wed, 13 May 2026 00:59:05 +0530 Subject: [PATCH] test: fix internal error test to include X-Tenant-ID --- tests/integration/dashboard.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/dashboard.test.ts b/tests/integration/dashboard.test.ts index 80b99ec..236254d 100644 --- a/tests/integration/dashboard.test.ts +++ b/tests/integration/dashboard.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { describe, expect, it } from "bun:test"; import { API_PREFIX } from "../../src/constants"; import { redis } from "../../src/core/RedisClient"; @@ -23,12 +22,15 @@ describe("Dashboard & Common Integration", () => { }); it("should return 500 for internal errors", async () => { - redis.keys.mockImplementationOnce(() => { + (redis.keys as any).mockImplementationOnce(() => { throw new Error("Redis Crash"); }); const res = await app.request(`${API_PREFIX}/status`, { - headers: { Authorization: "Bearer test-api-key" }, + headers: { + Authorization: "Bearer test-api-key", + "X-Tenant-ID": "test-tenant", + }, }); expect(res.status).toBe(500);