* Mock an undici request with a defined error.
(error)
| 11299 | } |
| 11300 | createMockScopeDispatchData({ statusCode, data, responseOptions }) { |
| 11301 | const responseData = getResponseData(data); |
| 11302 | const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; |
| 11303 | const headers = __spreadValues(__spreadValues(__spreadValues({}, this[kDefaultHeaders]), contentLength), responseOptions.headers); |
| 11304 | const trailers = __spreadValues(__spreadValues({}, this[kDefaultTrailers]), responseOptions.trailers); |
| 11305 | return { statusCode, data, headers, trailers }; |
| 11306 | } |
| 11307 | validateReplyParameters(replyParameters) { |
| 11308 | if (typeof replyParameters.statusCode === "undefined") { |
| 11309 | throw new InvalidArgumentError("statusCode must be defined"); |
| 11310 | } |
nothing calls this directly
no test coverage detected