/* eslint-env jest */ import BaseAgentService from '../../BaseAgentService'; import { fetchAgentGaps } from '../agent-analytics.service'; jest.mock('../../BaseAgentService', () => ({ __esModule: true, default: { get: jest.fn(() => Promise.resolve({ data: { gaps: [] } })) }, })); describe('the gaps the agent could not answer', () => { it('are asked for under the agent base, not at a doubled slash', async () => { await fetchAgentGaps('2026-08-25', '2026-09-23', 5, null, null); const url = (BaseAgentService.get as jest.Mock).mock.calls[0][0] as string; expect(url.startsWith('analytics/gaps?')).toBe(true); }); });