* Truncate text to max length.
(text: string, maxLen: number)
| 47 | * Truncate text to max length. |
| 48 | */ |
| 49 | static truncate(text: string, maxLen: number): string { |
| 50 | if (text.length <= maxLen) { |
| 51 | return text; |
| 52 | } |
| 53 | return `${text.substring(0, maxLen)}... (truncated)`; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Test 1: Default search configuration. |
no outgoing calls
no test coverage detected