method MockResponse.prototype.json
MockResponse.prototype.json<T>(_body: T): HandlerResult

Sends a JSON response.

Type Parameters

The body type

Parameters

_body: T

Return Type

HandlerResult

The handler result

Usage

import { MockResponse } from "testing/src/index.ts";