MCPcopy Create free account
hub / github.com/EvoMap/evolver / responseFromJson

Function responseFromJson

test/lifecycleNodeIdLegacyFallback.test.js:77–85  ·  view source on GitHub ↗
({ status = 200, json = {} } = {})

Source from the content-addressed store, hash-verified

75}
76
77function responseFromJson({ status = 200, json = {} } = {}) {
78 return {
79 ok: status >= 200 && status < 300,
80 status,
81 headers: { get: () => null },
82 json: async () => json,
83 text: async () => JSON.stringify(json),
84 };
85}
86
87// Run `body` with EVOLVER_HOME pointed at the given fake .evomap dir.
88// The reader routes through `paths.getEvomapDir()`, which honours

Calls

no outgoing calls

Tested by

no test coverage detected