From f34b8aa39e59d0bdb9f54ccd0d770bafe85675a6 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Thu, 22 Jan 2026 22:47:12 +0100 Subject: [PATCH] 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 --- packages/shared-frontend-utils/src/formatUtil.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/shared-frontend-utils/src/formatUtil.test.ts b/packages/shared-frontend-utils/src/formatUtil.test.ts index ac15a78b1..062321152 100644 --- a/packages/shared-frontend-utils/src/formatUtil.test.ts +++ b/packages/shared-frontend-utils/src/formatUtil.test.ts @@ -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', () => {