| 533 | // perform a health check on the serverURL value |
| 534 | if (Parse.serverURL) { |
| 535 | const isValidHttpUrl = string => { |
| 536 | let url; |
| 537 | try { |
| 538 | url = new URL(string); |
| 539 | } catch { |
| 540 | return false; |
| 541 | } |
| 542 | return url.protocol === 'http:' || url.protocol === 'https:'; |
| 543 | }; |
| 544 | const url = `${Parse.serverURL.replace(/\/$/, '')}/health`; |
| 545 | if (!isValidHttpUrl(url)) { |
| 546 | // eslint-disable-next-line no-console |
nothing calls this directly
no outgoing calls
no test coverage detected