MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / jsonResponse

Function jsonResponse

src/lib/http.test.ts:7–13  ·  view source on GitHub ↗
(body: unknown, init: ResponseInit = {})

Source from the content-addressed store, hash-verified

5import { VERSION } from '../version.js';
6
7function jsonResponse(body: unknown, init: ResponseInit = {}): Response {
8 return new Response(JSON.stringify(body), {
9 status: 200,
10 headers: { 'content-type': 'application/json' },
11 ...init,
12 });
13}
14
15function errorEnvelopeResponse(status: number, code: string, init: ResponseInit = {}): Response {
16 return jsonResponse(

Callers 2

errorEnvelopeResponseFunction · 0.70
http.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected