(msg)
| 94 | * → "Ref values are not allowed" |
| 95 | */ |
| 96 | export function shortenMessage(msg) { |
| 97 | const str = typeof msg === "string" ? msg : String(msg); |
| 98 | return str |
| 99 | .replace(/^Error: /, "") |
| 100 | .split(/\.\s/)[0] |
| 101 | .split("(http")[0] |
| 102 | .replace(/\.\s*$/, "") |
| 103 | .trim(); |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Remove diagnostics that share the same line + message. The compiler |
no test coverage detected