Skip to main content
Glama
MIT License
27,120
19,746
  • Linux
  • Apple
repomix-integration.test.ts•1.5 kB
import { beforeEach, describe, expect, it } from 'vitest'; // Mock DOM environment Object.defineProperty(window, 'location', { value: { pathname: '/yamadashy/repomix', href: 'https://github.com/yamadashy/repomix', }, writable: true, }); describe('RepomixIntegration', () => { beforeEach(() => { // Reset DOM document.body.innerHTML = ''; // Mock GitHub page structure const navActions = document.createElement('ul'); navActions.className = 'pagehead-actions'; document.body.appendChild(navActions); }); it('should extract repository information correctly', () => { // This is a placeholder test since we're testing static methods // In a real scenario, we'd need to import and test the actual classes const pathMatch = window.location.pathname.match(/^\/([^/]+)\/([^/]+)/); expect(pathMatch).toBeTruthy(); if (pathMatch) { const [, owner, repo] = pathMatch; expect(owner).toBe('yamadashy'); expect(repo).toBe('repomix'); } }); it('should construct correct Repomix URL', () => { const repoUrl = 'https://github.com/yamadashy/repomix'; const expectedUrl = `https://repomix.com/?repo=${encodeURIComponent(repoUrl)}`; expect(expectedUrl).toBe('https://repomix.com/?repo=https%3A%2F%2Fgithub.com%2Fyamadashy%2Frepomix'); }); it('should find navigation container', () => { const navContainer = document.querySelector('ul.pagehead-actions'); expect(navContainer).toBeTruthy(); }); });

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/yamadashy/repomix'

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