Skip to main content
Glama

Backlog MCP Server

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

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