refactor: remove any types from batch 18 test files (2 instances)

Fixed final 2 'as any' instances:
- formatUtil.test.ts: Used proper type casts for null/undefined test parameters

This completes the removal of all 'as any' type assertions from test files.
The only remaining match is a false positive in a comment.

Total fixed across all batches (13-18): 54 instances
This commit is contained in:
Johnpaul
2026-01-22 22:47:12 +01:00
parent df0aba83a0
commit f34b8aa39e

View File

@@ -120,8 +120,12 @@ describe('formatUtil', () => {
})
it('should handle null and undefined gracefully', () => {
expect(getMediaTypeFromFilename(null as any)).toBe('image')
expect(getMediaTypeFromFilename(undefined as any)).toBe('image')
expect(getMediaTypeFromFilename(null as unknown as string)).toBe(
'image'
)
expect(getMediaTypeFromFilename(undefined as unknown as string)).toBe(
'image'
)
})
it('should handle special characters in filenames', () => {