LCOV - code coverage report
Current view: top level - src/platform/assets/utils - categoryLabel.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 11.1 % 9 1
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1         2355 : const ACRONYM_TAGS = new Set(['VAE', 'CLIP', 'GLIGEN'])
       2              : 
       3            0 : export function formatCategoryLabel(raw?: string): string {
       4            0 :   if (!raw) return 'Models'
       5              : 
       6              :   // Special display name mappings
       7            0 :   if (raw === 'diffusion_models') return 'Diffusion'
       8              : 
       9            0 :   return raw
      10              :     .split('_')
      11              :     .map((segment) => {
      12            0 :       const upper = segment.toUpperCase()
      13            0 :       if (ACRONYM_TAGS.has(upper)) return upper
      14              : 
      15            0 :       const lower = segment.toLowerCase()
      16            0 :       return lower.charAt(0).toUpperCase() + lower.slice(1)
      17              :     })
      18              :     .join(' ')
      19              : }
        

Generated by: LCOV version 2.0-1