Skip to main content
Glama
MIT License
27,120
19,780
  • Linux
  • Apple
parseFile.java.test.ts•1.18 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 Java', () => { test('should parse Java correctly', async () => { const fileContent = ` /** * A simple Hello World class */ public class HelloWorld { /** * Main entry point * @param args command line arguments */ public static void main(String[] args) { System.out.println("Hello, world!"); } } `; const filePath = 'dummy.java'; const config = {}; const result = await parseFile(fileContent, filePath, createMockConfig(config)); expect(typeof result).toBe('string'); const expectContents = [ '/**', '* A simple Hello World class', '*/', 'public class HelloWorld {', '* Main entry point', '* @param args command line arguments', 'public static void main(String[] args) {', ]; 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