@param {string[]} headers
(headers)
| 61 | |
| 62 | /** @param {string[]} headers */ |
| 63 | function buildHeadersFromArray (headers) { // fetch HeadersList |
| 64 | const clone = headers.slice() |
| 65 | const entries = [] |
| 66 | for (let index = 0; index < clone.length; index += 2) { |
| 67 | entries.push([clone[index], clone[index + 1]]) |
| 68 | } |
| 69 | return Object.fromEntries(entries) |
| 70 | } |
| 71 | |
| 72 | function matchHeaders (mockDispatch, headers) { |
| 73 | if (typeof mockDispatch.headers === 'function') { |
no test coverage detected