Skip to main content
Glama

Backlog MCP Server

getWatchingListCount.test.ts1.08 kB
import { getWatchingListCountTool } from './getWatchingListCount.js'; import { jest, describe, it, expect } from '@jest/globals'; import type { Backlog } from 'backlog-js'; import { createTranslationHelper } from '../createTranslationHelper.js'; describe('getWatchingListCountTool', () => { const mockBacklog: Partial<Backlog> = { getWatchingListCount: jest.fn<() => Promise<any>>().mockResolvedValue({ count: 42, }), }; const mockTranslationHelper = createTranslationHelper(); const tool = getWatchingListCountTool( mockBacklog as Backlog, mockTranslationHelper ); it('returns watching list count as formatted JSON text', async () => { const result = await tool.handler({ userId: 1, }); if (Array.isArray(result)) { throw new Error('Unexpected array result'); } expect(result.count).toEqual(42); }); it('calls backlog.getWatchingListCount with correct params', async () => { await tool.handler({ userId: 1, }); expect(mockBacklog.getWatchingListCount).toHaveBeenCalledWith(1); }); });

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/nulab/backlog-mcp-server'

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