mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
🩹 test: Add findPiiMatchInMessages to OpenAI + Responses controller mocks
The OpenAI-compat and Responses controller specs mock `@librechat/api`
with a hand-listed object. The new `findPiiMatchInMessages` export
wired into both controllers in 3ea35af9a was missing from those
mocks, so the production lookup returned undefined and the controllers
threw at request time under jest. Added the missing entries (default
mock: returns null so the handlers fall through to the existing happy
paths). All 278 agents-controller tests pass locally.
This commit is contained in:
parent
3ea35af9ad
commit
87f7bdeb1f
2 changed files with 2 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ jest.mock('@librechat/api', () => ({
|
|||
resolveRecursionLimit: jest.fn().mockReturnValue(50),
|
||||
createToolExecuteHandler: jest.fn().mockReturnValue({ handle: jest.fn() }),
|
||||
isChatCompletionValidationFailure: jest.fn().mockReturnValue(false),
|
||||
findPiiMatchInMessages: jest.fn().mockReturnValue(null),
|
||||
discoverConnectedAgents: jest.fn().mockResolvedValue({
|
||||
agentConfigs: new Map(),
|
||||
edges: [],
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ jest.mock('@librechat/api', () => ({
|
|||
buildResponse: jest.fn().mockReturnValue({ id: 'resp_123', output: [] }),
|
||||
generateResponseId: jest.fn().mockReturnValue('resp_mock-123'),
|
||||
isValidationFailure: jest.fn().mockReturnValue(false),
|
||||
findPiiMatchInMessages: jest.fn().mockReturnValue(null),
|
||||
emitResponseCreated: jest.fn(),
|
||||
createResponseContext: jest.fn().mockReturnValue({ responseId: 'resp_123' }),
|
||||
createResponseTracker: jest.fn().mockReturnValue({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue