(opts)
| 11021 | } else if (typeof data === "object") { |
| 11022 | return JSON.stringify(data); |
| 11023 | } else { |
| 11024 | return data.toString(); |
| 11025 | } |
| 11026 | } |
| 11027 | function getMockDispatch(mockDispatches, key) { |
| 11028 | const basePath = key.query ? buildURL(key.path, key.query) : key.path; |
| 11029 | const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; |
| 11030 | let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path4 }) => matchValue(safeUrl(path4), resolvedPath)); |
| 11031 | if (matchedMockDispatches.length === 0) { |
| 11032 | throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); |
| 11033 | } |
| 11034 | matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); |
| 11035 | if (matchedMockDispatches.length === 0) { |
no outgoing calls
no test coverage detected