Skip to main content
Glama

GitHub Notifications MCP Server

formatters.test.ts1.32 kB
/** * Tests for formatter utilities */ import { convertApiUrlToHtmlUrl } from '../utils/formatters'; describe('URL Conversion Tests', () => { test('converts pull request API URLs to HTML URLs correctly', () => { const apiUrl = 'https://api.github.com/repos/nodejs/node/pulls/57557'; const expectedHtmlUrl = 'https://github.com/nodejs/node/pull/57557'; expect(convertApiUrlToHtmlUrl(apiUrl)).toBe(expectedHtmlUrl); }); test('converts issue API URLs to HTML URLs correctly', () => { const apiUrl = 'https://api.github.com/repos/nodejs/node/issues/12345'; const expectedHtmlUrl = 'https://github.com/nodejs/node/issues/12345'; expect(convertApiUrlToHtmlUrl(apiUrl)).toBe(expectedHtmlUrl); }); test('converts repository API URLs to HTML URLs correctly', () => { const apiUrl = 'https://api.github.com/repos/nodejs/node'; const expectedHtmlUrl = 'https://github.com/nodejs/node'; expect(convertApiUrlToHtmlUrl(apiUrl)).toBe(expectedHtmlUrl); }); test('handles URLs with additional path segments', () => { const apiUrl = 'https://api.github.com/repos/nodejs/node/pulls/57557/comments'; const expectedHtmlUrl = 'https://github.com/nodejs/node/pull/57557/comments'; expect(convertApiUrlToHtmlUrl(apiUrl)).toBe(expectedHtmlUrl); }); });

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/mcollina/mcp-github-notifications'

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