Skip to main content
Glama
MIT License
27,120
19,789
  • Linux
  • Apple
plainStyle.test.ts•1.53 kB
import process from 'node:process'; import { beforeEach, describe, expect, test, vi } from 'vitest'; import { generateOutput } from '../../../../src/core/output/outputGenerate.js'; import { createMockConfig } from '../../../testing/testUtils.js'; vi.mock('fs/promises'); describe('plainStyle', () => { beforeEach(() => { vi.resetAllMocks(); }); test('generateOutput for plain should include user-provided header text', async () => { const mockConfig = createMockConfig({ output: { filePath: 'output.txt', style: 'plain', headerText: 'Custom header text', topFilesLength: 2, showLineNumbers: false, removeComments: false, removeEmptyLines: false, }, }); const output = await generateOutput([process.cwd()], mockConfig, [], []); expect(output).toContain('File Summary'); expect(output).toContain('Directory Structure'); expect(output).toContain('Custom header text'); expect(output).toContain('Files'); }); test('plain style: headerText always present, generationHeader only if fileSummaryEnabled', async () => { const mockConfig = createMockConfig({ output: { filePath: 'output.txt', style: 'plain', fileSummary: false, headerText: 'PLAIN HEADER', }, }); const output = await generateOutput([process.cwd()], mockConfig, [], []); expect(output).not.toContain('This file is a merged representation'); expect(output).toContain('PLAIN HEADER'); }); });

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