refactor(tests): format code for better readability in test files
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user