Skip to main content
Glama
index.ts815 B
import * as path from 'path'; import Mocha from 'mocha'; import * as glob from 'glob'; export async function run(): Promise<void> { // Create the mocha test const mocha = new Mocha({ ui: 'tdd', color: true, timeout: 10000 }); const testsRoot = path.resolve(__dirname, '.'); const files = await glob.glob('**/*.test.js', { cwd: testsRoot }); // Add files to the test suite files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f))); try { // Run the mocha test await new Promise<void>((resolve, reject) => { mocha.run((failures: number) => { if (failures > 0) { reject(new Error(`${failures} tests failed.`)); } else { resolve(); } }); }); } catch (err) { console.error(err); throw err; } }

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/patelnav/my-tools-mcp'

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