(statusCode, data, responseOptions)
| 57493 | } |
| 57494 | createMockScopeDispatchData(statusCode, data, responseOptions = {}) { |
| 57495 | const responseData = getResponseData(data); |
| 57496 | const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; |
| 57497 | const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; |
| 57498 | const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; |
| 57499 | return { statusCode, data, headers, trailers }; |
| 57500 | } |
| 57501 | validateReplyParameters(statusCode, data, responseOptions) { |
| 57502 | if (typeof statusCode === "undefined") { |
| 57503 | throw new InvalidArgumentError("statusCode must be defined"); |
| 57504 | } |
| 57505 | if (typeof data === "undefined") { |
| 57506 | throw new InvalidArgumentError("data must be defined"); |
| 57507 | } |
| 57508 | if (typeof responseOptions !== "object") { |
no outgoing calls
no test coverage detected