From d98cdae3949e49a3f3209446c95f1c1c033d219b Mon Sep 17 00:00:00 2001 From: abhi1992002 Date: Wed, 29 Apr 2026 19:56:33 +0530 Subject: [PATCH] fix(frontend): type jsonHandler body as JsonBodyType CI's pnpm types step caught that http[method](...) needs MSW's JsonBodyType, not unknown. --- .../settings/billing/__tests__/billing-page.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/billing/__tests__/billing-page.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/billing/__tests__/billing-page.test.tsx index fd9f26df22..7056e91013 100644 --- a/autogpt_platform/frontend/src/app/(platform)/settings/billing/__tests__/billing-page.test.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/settings/billing/__tests__/billing-page.test.tsx @@ -1,4 +1,4 @@ -import { http, HttpResponse } from "msw"; +import { http, HttpResponse, type JsonBodyType } from "msw"; import { describe, expect, it } from "vitest"; import { server } from "@/mocks/mock-server"; @@ -28,7 +28,7 @@ const COPILOT_USAGE_RESPONSE = { const INVOICES_RESPONSE: never[] = []; -function jsonHandler(method: "get" | "post", path: string, body: unknown) { +function jsonHandler(method: "get" | "post", path: string, body: JsonBodyType) { return http[method](`*${path}`, () => HttpResponse.json(body)); }