Skip to main content
Glama
analyze-build-problems.test.ts915 B
describe('tools: analyze_build_problems', () => { afterEach(() => { jest.resetModules(); jest.clearAllMocks(); }); it('passes an id-prefixed locator to getBuildProblems', async () => { const getBuild = jest.fn().mockResolvedValue({ status: 'SUCCESS', statusText: 'All good' }); const getBuildProblems = jest.fn().mockResolvedValue({ data: [] }); const listTestFailures = jest.fn().mockResolvedValue([]); jest.doMock('@/api-client', () => ({ TeamCityAPI: { getInstance: () => ({ getBuild, builds: { getBuildProblems }, listTestFailures, }), }, })); // eslint-disable-next-line @typescript-eslint/no-var-requires const { getRequiredTool } = require('@/tools'); await getRequiredTool('analyze_build_problems').handler({ buildId: '123' }); expect(getBuildProblems).toHaveBeenCalledWith('id:123'); }); });

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/Daghis/teamcity-mcp'

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