@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
13 lines • 378 B
JavaScript
/**
* Get a JSON response for the passed in object, for use with `request.respond`.
*
* @param {Object} obj Object to seralise for response.
* @return {Object} Response for use with `request.respond`.
*/
export function getJSONResponse(obj) {
return {
contentType: 'application/json',
body: JSON.stringify(obj)
};
}
//# sourceMappingURL=get-json-response.js.map