Skip to main content
Glama
setup.ts1.11 kB
import * as fs from 'fs-extra'; import * as path from 'path'; // Test setup configuration const testWorkspaceRoot = path.join(__dirname, '../../test-workspace'); beforeAll(async () => { // Create test workspace directory await fs.ensureDir(testWorkspaceRoot); }); afterAll(async () => { // Cleanup test workspace await fs.remove(testWorkspaceRoot); }); beforeEach(async () => { // Clean up test workspace before each test await fs.emptyDir(testWorkspaceRoot); }); // Export test utilities export const TEST_WORKSPACE_ROOT = testWorkspaceRoot; export function createTestFile(relativePath: string, content: string): Promise<void> { const fullPath = path.join(testWorkspaceRoot, relativePath); return fs.outputFile(fullPath, content); } export function readTestFile(relativePath: string): Promise<string> { const fullPath = path.join(testWorkspaceRoot, relativePath); return fs.readFile(fullPath, 'utf-8'); } export function testFileExists(relativePath: string): Promise<boolean> { const fullPath = path.join(testWorkspaceRoot, relativePath); return fs.pathExists(fullPath); }

Latest Blog Posts

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/Siddhant-K-code/mcp-devcontainer'

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