From 5b0ddcc7cd6e4dad8881c17fc11add8149f043f8 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Wed, 25 Feb 2026 03:41:03 +0530 Subject: [PATCH] refactor(tests): format code for better readability in test files --- backend/tests/test_security_headers_middleware.py | 4 +++- frontend/src/app/activity/page.test.tsx | 3 ++- frontend/src/app/approvals/page.test.tsx | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/tests/test_security_headers_middleware.py b/backend/tests/test_security_headers_middleware.py index 844aeccf..000e03c8 100644 --- a/backend/tests/test_security_headers_middleware.py +++ b/backend/tests/test_security_headers_middleware.py @@ -38,7 +38,9 @@ async def test_security_headers_middleware_appends_lowercase_raw_header_names() sent_messages.append(message) middleware = SecurityHeadersMiddleware(app, x_frame_options="SAMEORIGIN") - await middleware({"type": "http", "method": "GET", "path": "/", "headers": []}, lambda: None, capture) + await middleware( + {"type": "http", "method": "GET", "path": "/", "headers": []}, lambda: None, capture + ) response_start = next( message for message in sent_messages if message.get("type") == "http.response.start" diff --git a/frontend/src/app/activity/page.test.tsx b/frontend/src/app/activity/page.test.tsx index 388a5826..cabeeb78 100644 --- a/frontend/src/app/activity/page.test.tsx +++ b/frontend/src/app/activity/page.test.tsx @@ -63,7 +63,8 @@ vi.mock("@clerk/nextjs", () => { describe("/activity auth boundary", () => { it("renders without ClerkProvider runtime errors when publishable key is a placeholder", () => { const previousAuthMode = process.env.NEXT_PUBLIC_AUTH_MODE; - const previousPublishableKey = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY; + const previousPublishableKey = + process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY; // Simulate CI/secretless env where an arbitrary placeholder value may be present. // AuthProvider should treat this as disabled, and the auth wrappers must not render diff --git a/frontend/src/app/approvals/page.test.tsx b/frontend/src/app/approvals/page.test.tsx index cb812fac..1438ba58 100644 --- a/frontend/src/app/approvals/page.test.tsx +++ b/frontend/src/app/approvals/page.test.tsx @@ -60,7 +60,8 @@ vi.mock("@clerk/nextjs", () => { describe("/approvals auth boundary", () => { it("renders without ClerkProvider runtime errors when publishable key is a placeholder", () => { const previousAuthMode = process.env.NEXT_PUBLIC_AUTH_MODE; - const previousPublishableKey = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY; + const previousPublishableKey = + process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY; process.env.NEXT_PUBLIC_AUTH_MODE = "local"; process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY = "placeholder";