Skip to main content
Glama
naoto24kawa

Composer Package README MCP Server

by naoto24kawa
github-api.test.ts1.77 kB
import { expect, test, describe } from "vitest"; describe('GitHubApiClient', () => { test('should exist and be constructable', () => { const { GitHubApiClient } = require('../../dist/src/services/github-api.js'); expect(typeof GitHubApiClient).toBe('function'); const client = new GitHubApiClient(); expect(client).toBeDefined(); }); test('should have required methods', () => { const { GitHubApiClient } = require('../../dist/src/services/github-api.js'); const client = new GitHubApiClient(); expect(typeof client.getReadme).toBe('function'); expect(typeof client.parseRepositoryUrl).toBe('function'); expect(typeof client.getReadmeFromRepository).toBe('function'); expect(typeof client.isRateLimited).toBe('function'); expect(typeof client.getRateLimitStatus).toBe('function'); }); test('should create client with token and timeout', () => { const { GitHubApiClient } = require('../../dist/src/services/github-api.js'); const client = new GitHubApiClient('test-token', 10000); expect(client).toBeDefined(); }); test('should parse GitHub repository URLs', () => { const { GitHubApiClient } = require('../../dist/src/services/github-api.js'); const client = new GitHubApiClient(); const result = client.parseRepositoryUrl('https://github.com/symfony/console.git'); expect(result).toEqual({ owner: 'symfony', repo: 'console', }); }); test('should return null for invalid URLs', () => { const { GitHubApiClient } = require('../../dist/src/services/github-api.js'); const client = new GitHubApiClient(); const result = client.parseRepositoryUrl('https://gitlab.com/symfony/console.git'); expect(result).toBeNull(); }); });

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/naoto24kawa/composer-package-readme-mcp-server'

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