MCPcopy Create free account
hub / github.com/angular/dev-infra / handleReply

Function handleReply

github-actions/browserstack/set-browserstack-env.js:11097–11113  ·  view source on GitHub ↗
(mockDispatches, _data = data)

Source from the content-addressed store, hash-verified

11095 return headers.get(key);
11096 } else {
11097 return lowerCaseEntries(headers)[key.toLocaleLowerCase()];
11098 }
11099 }
11100 function buildHeadersFromArray(headers) {
11101 const clone = headers.slice();
11102 const entries = [];
11103 for (let index = 0; index < clone.length; index += 2) {
11104 entries.push([clone[index], clone[index + 1]]);
11105 }
11106 return Object.fromEntries(entries);
11107 }
11108 function matchHeaders(mockDispatch2, headers) {
11109 if (typeof mockDispatch2.headers === "function") {
11110 if (Array.isArray(headers)) {
11111 headers = buildHeadersFromArray(headers);
11112 }
11113 return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {});
11114 }
11115 if (typeof mockDispatch2.headers === "undefined") {
11116 return true;

Callers 1

mockDispatchFunction · 0.70

Calls 8

buildHeadersFromArrayFunction · 0.70
__spreadPropsFunction · 0.70
__spreadValuesFunction · 0.70
getResponseDataFunction · 0.70
generateKeyValuesFunction · 0.70
getStatusTextFunction · 0.70
deleteMockDispatchFunction · 0.70
onErrorMethod · 0.45

Tested by

no test coverage detected