From 9005625a6ff8fffffbd54077722b8e8b2e1200f3 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 11 Mar 2026 21:38:54 -0400 Subject: [PATCH] feat(tests): add markSummarizationUsage mock for improved test coverage Introduced a mock for the markSummarizationUsage function in the responses unit tests to enhance the testing of summarization usage tracking. This addition supports better validation of summarization-related functionalities and ensures comprehensive test coverage for the agents' response handling. --- api/server/controllers/agents/__tests__/responses.unit.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/api/server/controllers/agents/__tests__/responses.unit.spec.js b/api/server/controllers/agents/__tests__/responses.unit.spec.js index 2b38a00771..b3b828966a 100644 --- a/api/server/controllers/agents/__tests__/responses.unit.spec.js +++ b/api/server/controllers/agents/__tests__/responses.unit.spec.js @@ -107,6 +107,7 @@ const mockGetCacheMultiplier = jest.fn().mockReturnValue(null); jest.mock('~/server/controllers/agents/callbacks', () => ({ createToolEndCallback: jest.fn().mockReturnValue(jest.fn()), createResponsesToolEndCallback: jest.fn().mockReturnValue(jest.fn()), + markSummarizationUsage: jest.fn(), })); jest.mock('~/server/services/PermissionService', () => ({