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

Function test_getResponseHeader

apps/automated/src/xhr/xhr-tests.ts:384–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

382}
383
384export function test_getResponseHeader() {
385 const xhr = <any>new XMLHttpRequest();
386 const response = {
387 statusCode: 200,
388 content: {
389 toString: function () {
390 return this.raw;
391 },
392 raw: '{"data": 42}',
393 },
394 headers: {
395 'content-type': 'application/json',
396 },
397 };
398 xhr._loadResponse(response);
399
400 TKUnit.assertEqual(xhr.getResponseHeader('Content-Type'), 'application/json');
401}
402
403export var test_XMLHttpRequest_contentReceivedArrayBufferProperly = function (done) {
404 // <snippet module="xhr" title="xhr">

Callers

nothing calls this directly

Calls 2

_loadResponseMethod · 0.80
getResponseHeaderMethod · 0.80

Tested by

no test coverage detected