(mockDispatches, _data = data)
| 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; |
no test coverage detected