From e155c6db5cec9bc577d548fa7c7378013631c79c Mon Sep 17 00:00:00 2001 From: Guillaume <20539361+p9f@users.noreply.github.com> Date: Fri, 10 Feb 2023 14:51:41 +0000 Subject: [PATCH] doc(mock): update out-of-date reply documentation (#1913) --- docs/api/MockPool.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/MockPool.md b/docs/api/MockPool.md index c86f9a30adb..923c157aa64 100644 --- a/docs/api/MockPool.md +++ b/docs/api/MockPool.md @@ -63,7 +63,8 @@ Returns: `MockInterceptor` corresponding to the input options. We can define the behaviour of an intercepted request with the following options. -* **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define this as a callback to read incoming request data. Default for `responseOptions` is `{}`. +* **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define the replyData as a callback to read incoming request data. Default for `responseOptions` is `{}`. +* **reply** `(callback: MockInterceptor.MockReplyOptionsCallback) => MockScope` - define a reply for a matching request, allowing dynamic mocking of all reply options rather than just the data. * **replyWithError** `(error: Error) => MockScope` - define an error for a matching request to throw. * **defaultReplyHeaders** `(headers: Record) => MockInterceptor` - define default headers to be included in subsequent replies. These are in addition to headers on a specific reply. * **defaultReplyTrailers** `(trailers: Record) => MockInterceptor` - define default trailers to be included in subsequent replies. These are in addition to trailers on a specific reply.