* Mock an undici request with a defined error.
(error)
| 164 | * Mock an undici request with a defined error. |
| 165 | */ |
| 166 | replyWithError (error) { |
| 167 | if (typeof error === 'undefined') { |
| 168 | throw new InvalidArgumentError('error must be defined') |
| 169 | } |
| 170 | |
| 171 | const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) |
| 172 | return new MockScope(newMockDispatch) |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Set default reply headers on the interceptor for subsequent replies |
no test coverage detected