Skip to main content
Glama

For Five Coffee MCP Server

by Kong
jest.setup.js2.96 kB
// Jest setup file to handle global variables and polyfills for Node.js environment // This ensures compatibility across different Node.js versions in CI console.log(`Node.js version: ${process.version}`); // Polyfill Web APIs that are missing in Node.js test environment if (typeof global.File === 'undefined') { global.File = class File { constructor(chunks, filename, options = {}) { this.chunks = chunks; this.name = filename; this.type = options.type || ''; this.lastModified = options.lastModified || Date.now(); this.size = chunks.reduce((size, chunk) => size + (chunk.length || 0), 0); } stream() { return new global.ReadableStream({ start(controller) { this.chunks.forEach(chunk => controller.enqueue(chunk)); controller.close(); }, }); } text() { return Promise.resolve(this.chunks.join('')); } arrayBuffer() { return Promise.resolve(new ArrayBuffer(this.size)); } }; } if (typeof global.FormData === 'undefined') { global.FormData = class FormData { constructor() { this._data = new Map(); } append(key, value) { if (this._data.has(key)) { const existing = this._data.get(key); if (Array.isArray(existing)) { existing.push(value); } else { this._data.set(key, [existing, value]); } } else { this._data.set(key, value); } } get(key) { const value = this._data.get(key); return Array.isArray(value) ? value[0] : value; } getAll(key) { const value = this._data.get(key); return Array.isArray(value) ? value : [value]; } has(key) { return this._data.has(key); } delete(key) { this._data.delete(key); } entries() { return this._data.entries(); } keys() { return this._data.keys(); } values() { return this._data.values(); } }; } // Polyfill Blob if missing if (typeof global.Blob === 'undefined') { global.Blob = class Blob { constructor(chunks = [], options = {}) { this.chunks = chunks; this.type = options.type || ''; this.size = chunks.reduce((size, chunk) => size + (chunk.length || 0), 0); } text() { return Promise.resolve(this.chunks.join('')); } arrayBuffer() { return Promise.resolve(new ArrayBuffer(this.size)); } }; } // Polyfill ReadableStream if missing if (typeof global.ReadableStream === 'undefined') { global.ReadableStream = class ReadableStream { constructor(source) { this.source = source; } }; } // Suppress experimental warnings in tests const originalEmit = process.emit; process.emit = function (name, data, ..._args) { if (name === 'warning' && typeof data === 'object' && data.name === 'ExperimentalWarning') { return false; } return originalEmit.apply(process, arguments); };

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/Kong/menu-mpc'

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