Type Alias: MockCall
MockCall =
object
Defined in: src/mock/types.ts:7
A recorded request intercepted by the mock. Inspect these via mock.calls() and mock.lastCall() to assert on what was sent.
Properties
body
body:
unknown
Defined in: src/mock/types.ts:20
Parsed request body. JSON-parsed object/array when Content-Type is application/json, decoded text for every other body (including raw body payloads), null when the request has no body.
headers
headers:
Record<string,string>
Defined in: src/mock/types.ts:13
Request headers as a plain string-to-string object
method
method:
HttpMethod
Defined in: src/mock/types.ts:9
HTTP method of the intercepted request
searchParams
searchParams:
URLSearchParams
Defined in: src/mock/types.ts:22
URL search/query parameters
url
url:
string
Defined in: src/mock/types.ts:11
Full URL of the intercepted request