(type: string, text: string, locationUrl: string)
| 499 | * of which form Chrome emits. |
| 500 | */ |
| 501 | export function isFontResourceError(type: string, text: string, locationUrl: string): boolean { |
| 502 | if (type !== "error") return false; |
| 503 | if (!text.startsWith("Failed to load resource")) return false; |
| 504 | return /fonts\.googleapis|fonts\.gstatic|\.(woff2?|ttf|otf)(\b|$)/i.test( |
| 505 | `${locationUrl} ${text}`, |
| 506 | ); |
| 507 | } |
| 508 | |
| 509 | export function formatConsoleDiagnostic( |
| 510 | type: string, |
no outgoing calls
no test coverage detected