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:
Aron Gates 2026-05-07 01:25:18 -07:00
parent 629a5950b1
commit 52ea2da66d
No known key found for this signature in database
GPG key ID: 4F5BDD01E0CFE2A0

View file

@ -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);
});