mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
fix: use mockSanitizeArtifactPath in retention test
The 'getRetentionExpiry is called with the request object' test referenced an undefined `mockSanitizeFilename` identifier, breaking both lint (no-undef) and the test suite. Use the existing `mockSanitizeArtifactPath` mock that the surrounding tests already use, since `processCodeOutput` calls `sanitizeArtifactPath` (not `sanitizeFilename`) before invoking `getRetentionExpiry`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
629a5950b1
commit
52ea2da66d
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ describe('processCodeOutput path traversal protection', () => {
|
|||
});
|
||||
|
||||
test('getRetentionExpiry is called with the request object', async () => {
|
||||
mockSanitizeFilename.mockReturnValueOnce('output.csv');
|
||||
mockSanitizeArtifactPath.mockReturnValueOnce('output.csv');
|
||||
await processCodeOutput({ ...baseParams, name: 'output.csv' });
|
||||
expect(getRetentionExpiry).toHaveBeenCalledWith(baseParams.req);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue