(done: (err: Error, res?: string) => void)
| 51 | }; |
| 52 | |
| 53 | export var test_fetch_formData = function (done: (err: Error, res?: string) => void) { |
| 54 | // >> fetch-formdata |
| 55 | fetch('https://http-echo.nativescript.org/get') |
| 56 | .then((response) => response.formData()) |
| 57 | .then(function (r) { |
| 58 | // Argument (r) is FormData object! |
| 59 | // >> (hide) |
| 60 | TKUnit.assert(r instanceof FormData, 'Result from formData() should be FormData object! Actual result is: ' + r); |
| 61 | done(null); |
| 62 | // << (hide) |
| 63 | }) |
| 64 | .catch(failOnError(done)); |
| 65 | // << fetch-formdata |
| 66 | }; |
| 67 | |
| 68 | export var test_fetch_blob = function (done: (err: Error, res?: string) => void) { |
| 69 | // >> fetch-blob |
nothing calls this directly
no test coverage detected