Skip to main content
Glama
MIT License
27,120
19,780
  • Linux
  • Apple
parseFile.csharp.test.ts•1.25 kB
import { describe, expect, test } from 'vitest'; import { parseFile } from '../../../src/core/treeSitter/parseFile.js'; import { createMockConfig } from '../../../tests/testing/testUtils.js'; describe('parseFile for C#', () => { test('should parse C# correctly', async () => { const fileContent = ` // Program class containing the entry point /// <summary> /// The main program class /// </summary> class Program { // The main entry point /// <summary> /// Writes a greeting to the console /// </summary> static void Main() { Console.WriteLine("Hello, world!"); } } `; const filePath = 'dummy.cs'; const config = {}; const result = await parseFile(fileContent, filePath, createMockConfig(config)); expect(typeof result).toBe('string'); const expectContents = [ '// Program class containing the entry point', '/// <summary>', 'class Program {', '// The main program class', '// The main entry point', '/// Writes a greeting to the console', 'static void Main() {', ]; for (const expectContent of expectContents) { expect(result).toContain(expectContent); } }); });

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