(done: (err: Error, res?: string) => void)
| 7 | }; |
| 8 | |
| 9 | export var test_fetch = function (done: (err: Error, res?: string) => void) { |
| 10 | // >> fetch-response |
| 11 | fetch('https://http-echo.nativescript.org/get') |
| 12 | .then(function (r) { |
| 13 | // Argument (r) is Response! |
| 14 | // >> (hide) |
| 15 | TKUnit.assert(r instanceof Response, 'Result from fetch() should be valid Response object! Actual result is: ' + r); |
| 16 | done(null); |
| 17 | // << (hide) |
| 18 | }) |
| 19 | .catch(failOnError(done)); |
| 20 | // << fetch-response |
| 21 | }; |
| 22 | |
| 23 | export var test_fetch_text = function (done: (err: Error, res?: string) => void) { |
| 24 | // >> fetch-string |
nothing calls this directly
no test coverage detected