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

Function responseFromJson

test/lifecycleRateLimit.test.js:46–54  ·  view source on GitHub ↗
({ status = 200, json = {}, headers = {} } = {})

Source from the content-addressed store, hash-verified

44}
45
46function responseFromJson({ status = 200, json = {}, headers = {} } = {}) {
47 return {
48 ok: status >= 200 && status < 300,
49 status,
50 headers: { get: (k) => headers[k.toLowerCase()] || headers[k] || null },
51 json: async () => json,
52 text: async () => JSON.stringify(json),
53 };
54}
55
56test('lifecycle hello: sets _helloRateLimitUntil when hub returns 429', async () => {
57 const originalFetch = global.fetch;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected