LCOV - code coverage report
Current view: top level - packages/design-system/src/components/common - textTickerUtils.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 7 7
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1          160 : export function splitTextAtWordBoundary(
       2              :   text: string,
       3              :   ratio: number
       4              : ): [string, string] {
       5          160 :   if (ratio >= 1) return [text, '']
       6          160 :   const estimate = Math.floor(text.length * ratio)
       7          160 :   const before = text.lastIndexOf(' ', estimate)
       8          160 :   const breakIndex = before > 0 ? before : text.indexOf(' ')
       9          160 :   if (breakIndex <= 0) return [text, '']
      10          156 :   return [text.substring(0, breakIndex), text.substring(breakIndex + 1)]
      11              : }
        

Generated by: LCOV version 2.0-1