(errorMessage: string)
| 85 | } |
| 86 | |
| 87 | function normalizeErrorText(errorMessage: string): string { |
| 88 | let out = ''; |
| 89 | let inWhitespace = false; |
| 90 | for (const ch of errorMessage.toLowerCase()) { |
| 91 | if (ch.trim().length === 0) { |
| 92 | if (!inWhitespace) out += ' '; |
| 93 | inWhitespace = true; |
| 94 | } else { |
| 95 | out += ch; |
| 96 | inWhitespace = false; |
| 97 | } |
| 98 | } |
| 99 | return out; |
| 100 | } |
| 101 | |
| 102 | function includesWord(message: string, word: string): boolean { |
| 103 | let index = message.indexOf(word); |
no outgoing calls
no test coverage detected