Skip to main content
Glama
GitHubConfig.test.tsโ€ข1.46 kB
import { describe, expect, it } from '@jest/globals'; import { GitHubConfig } from '../../../../infrastructure/github/GitHubConfig'; describe('GitHubConfig', () => { const owner = 'test-owner'; const repo = 'test-repo'; const token = 'test-token'; it('should create a config instance with all properties', () => { const config = new GitHubConfig(owner, repo, token); expect(config.owner).toBe(owner); expect(config.repo).toBe(repo); expect(config.token).toBe(token); }); it('should not allow modification of properties', () => { const config = new GitHubConfig(owner, repo, token); expect(() => { (config as any).owner = 'new-owner'; }).toThrow(); expect(() => { (config as any).repo = 'new-repo'; }).toThrow(); expect(() => { (config as any).token = 'new-token'; }).toThrow(); expect(config.owner).toBe(owner); expect(config.repo).toBe(repo); expect(config.token).toBe(token); }); it('should throw error if owner is empty', () => { expect(() => { new GitHubConfig('', repo, token); }).toThrow('Owner is required'); }); it('should throw error if repo is empty', () => { expect(() => { new GitHubConfig(owner, '', token); }).toThrow('Repository is required'); }); it('should throw error if token is empty', () => { expect(() => { new GitHubConfig(owner, repo, ''); }).toThrow('Token is required'); }); });

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/HarshKumarSharma/MCP'

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