import { describe, expect, it } from 'vitest' import { assertRequiredSupabaseConfig } from './runtime-config' describe('required Supabase runtime config', () => { it('accepts complete credentials', () => { expect(() => assertRequiredSupabaseConfig({ supabaseUrl: 'https://example.supabase.co', supabaseServiceRoleKey: 'service', public: { supabaseUrl: 'https://example.supabase.co', supabaseAnonKey: 'anon' } })).not.toThrow() }) it('reports missing credentials clearly', () => { expect(() => assertRequiredSupabaseConfig({ public: {} })).toThrow('SUPABASE_SERVICE_ROLE_KEY is required') }) })