Skip to content

Commit e892194

Browse files
francofrizzoclaude
andcommitted
fix test: provide fallback supabase URL for unit test env
Prevents createClient from throwing when env vars are missing during unit tests that transitively import the supabase client. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 95c572e commit e892194

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/supabaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createClient } from "@supabase/supabase-js";
22

3-
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
4-
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
3+
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL ?? "http://localhost";
4+
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY ?? "dummy";
55

66
export const supabase = createClient(supabaseUrl, supabaseAnonKey);

0 commit comments

Comments
 (0)