Skip to main content
Glama
memory-service.test.ts871 B
import { MemoryService } from '../mcp/memory-service.js'; import type { MCPMemConfig } from '../utils/config.js'; jest.mock('../database/index.js'); jest.mock('../embedding/index.js'); describe('MemoryService', () => { let memoryService: MemoryService; let mockConfig: MCPMemConfig; beforeEach(() => { mockConfig = { embedding: { provider: 'openai', apiKey: 'test-key', model: 'text-embedding-3-small', }, database: { path: './test-mcpmem.db', }, }; }); it('should create a memory service instance', () => { expect(() => { memoryService = new MemoryService(mockConfig); }).not.toThrow(); }); it('should get embedding info', () => { memoryService = new MemoryService(mockConfig); const info = memoryService.getEmbeddingInfo(); expect(info).toHaveProperty('model'); expect(info).toHaveProperty('dimensions'); }); });

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/designly1/mcpmem'

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