Skip to main content
Glama

Backlog MCP Server

getPriorities.test.ts1.24 kB
import { getPrioritiesTool } from './getPriorities.js'; import { jest, describe, it, expect } from '@jest/globals'; import type { Backlog } from 'backlog-js'; import { createTranslationHelper } from '../createTranslationHelper.js'; describe('getPrioritiesTool', () => { const mockBacklog: Partial<Backlog> = { getPriorities: jest.fn<() => Promise<any>>().mockResolvedValue([ { id: 2, name: 'High', }, { id: 3, name: 'Normal', }, { id: 4, name: 'Low', }, ]), }; const mockTranslationHelper = createTranslationHelper(); const tool = getPrioritiesTool(mockBacklog as Backlog, mockTranslationHelper); it('returns priorities list as formatted JSON text', async () => { const result = await tool.handler({}); if (!Array.isArray(result)) { throw new Error('Unexpected non array result'); } expect(result).toHaveLength(3); expect(result[0].name).toContain('High'); expect(result[1].name).toContain('Normal'); expect(result[2].name).toContain('Low'); }); it('calls backlog.getPriorities', async () => { await tool.handler({}); expect(mockBacklog.getPriorities).toHaveBeenCalled(); }); });

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