(done: (err: Error, res?: string) => void)
| 66 | }; |
| 67 | |
| 68 | export var test_fetch_blob = function (done: (err: Error, res?: string) => void) { |
| 69 | // >> fetch-blob |
| 70 | fetch('https://http-echo.nativescript.org/get') |
| 71 | .then((response) => response.blob()) |
| 72 | .then(function (r) { |
| 73 | // Argument (r) is Blob object! |
| 74 | // >> (hide) |
| 75 | TKUnit.assertNotNull(r, 'Result from blob() should be Blob object!'); |
| 76 | done(null); |
| 77 | // << (hide) |
| 78 | }) |
| 79 | .catch(failOnError(done)); |
| 80 | // << fetch-blob |
| 81 | }; |
| 82 | |
| 83 | export var test_fetch_arraybuffer = function (done: (err: Error, res?: string) => void) { |
| 84 | // >> fetch-arraybuffer |
nothing calls this directly
no test coverage detected