Skip to main content
Glama
tanamurayuuki

Gemini URL Context & Search MCP Server

Environment.test.ts1.58 kB
import { Environment } from './Environment.js'; describe('Environment', () => { let originalEnv: NodeJS.ProcessEnv; beforeEach(() => { originalEnv = { ...process.env }; }); afterEach(() => { process.env = originalEnv; }); describe('Should_ThrowError_When_GeminiApiKeyMissing', () => { it('throws error when GEMINI_API_KEY is undefined', () => { delete process.env.GEMINI_API_KEY; expect(() => Environment.load()).toThrow('GEMINI_API_KEY is required'); }); it('throws error when GEMINI_API_KEY is empty string', () => { process.env.GEMINI_API_KEY = ''; expect(() => Environment.load()).toThrow('GEMINI_API_KEY is required'); }); }); describe('Should_LoadSuccessfully_When_GeminiApiKeyProvided', () => { it('loads environment with valid API key', () => { process.env.GEMINI_API_KEY = 'test-api-key-123'; const env = Environment.load(); expect(env.geminiApiKey).toBe('test-api-key-123'); }); it('loads with default model name when not specified', () => { process.env.GEMINI_API_KEY = 'test-api-key-123'; delete process.env.GEMINI_MODEL_NAME; const env = Environment.load(); expect(env.modelName).toBe('gemini-2.0-flash-exp'); }); it('loads with custom model name when specified', () => { process.env.GEMINI_API_KEY = 'test-api-key-123'; process.env.GEMINI_MODEL_NAME = 'gemini-pro'; const env = Environment.load(); expect(env.modelName).toBe('gemini-pro'); }); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tanamurayuuki/MCP-URLcontext'

If you have feedback or need assistance with the MCP directory API, please join our Discord server