MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / test_fetch_blob

Function test_fetch_blob

apps/automated/src/fetch/fetch-tests.ts:68–81  ·  view source on GitHub ↗
(done: (err: Error, res?: string) => void)

Source from the content-addressed store, hash-verified

66};
67
68export 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
83export var test_fetch_arraybuffer = function (done: (err: Error, res?: string) => void) {
84 // >> fetch-arraybuffer

Callers

nothing calls this directly

Calls 2

fetchFunction · 0.85
failOnErrorFunction · 0.85

Tested by

no test coverage detected