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

Function test_fetch_formData

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

Source from the content-addressed store, hash-verified

51};
52
53export 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
68export var test_fetch_blob = function (done: (err: Error, res?: string) => void) {
69 // >> fetch-blob

Callers

nothing calls this directly

Calls 3

fetchFunction · 0.85
failOnErrorFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected