(body)
| 11051 | const replyData = typeof data === "function" ? { callback: data } : __spreadValues({}, data); |
| 11052 | const newMockDispatch = __spreadProps(__spreadValues(__spreadValues({}, baseData), key), { pending: true, data: __spreadValues({ error: null }, replyData) }); |
| 11053 | mockDispatches.push(newMockDispatch); |
| 11054 | return newMockDispatch; |
| 11055 | } |
| 11056 | function deleteMockDispatch(mockDispatches, key) { |
| 11057 | const index = mockDispatches.findIndex((dispatch) => { |
| 11058 | if (!dispatch.consumed) { |
| 11059 | return false; |
| 11060 | } |
| 11061 | return matchKey(dispatch, key); |
| 11062 | }); |
| 11063 | if (index !== -1) { |
| 11064 | mockDispatches.splice(index, 1); |
| 11065 | } |
| 11066 | } |
| 11067 | function buildKey(opts) { |
| 11068 | const { path: path4, method, body, headers, query } = opts; |
| 11069 | return { |
| 11070 | path: path4, |
| 11071 | method, |
| 11072 | body, |
| 11073 | headers, |
| 11074 | query |
| 11075 | }; |
| 11076 | } |
nothing calls this directly
no test coverage detected