Skip to main content
Glama
portel-dev

NCP - Natural Context Provider

by portel-dev
fs.cjs922 B
// Mock fs module for Jest testing // Use CommonJS to ensure Jest.mock() works correctly with this mock const mockFs = { existsSync: jest.fn(() => false), readFileSync: jest.fn(() => ''), writeFileSync: jest.fn(), mkdirSync: jest.fn(), readFile: jest.fn((path, callback) => callback(null, '')), writeFile: jest.fn((path, data, callback) => callback(null)), mkdir: jest.fn((path, callback) => callback(null)), readdirSync: jest.fn(() => []), statSync: jest.fn(() => ({ isDirectory: () => false })), createWriteStream: jest.fn(() => ({ write: jest.fn(), end: jest.fn((callback) => callback && callback()), on: jest.fn(), once: jest.fn(), emit: jest.fn() })), createReadStream: jest.fn(() => ({ on: jest.fn(), once: jest.fn(), emit: jest.fn() })), rmSync: jest.fn(), rm: jest.fn((path, opts, callback) => callback && callback(null)) }; module.exports = mockFs;

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/portel-dev/ncp'

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