MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / createMockScopeDispatchData

Method createMockScopeDispatchData

out/cli.cjs:57488–57494  ·  view source on GitHub ↗
(statusCode, data, responseOptions = {})

Source from the content-addressed store, hash-verified

57486 opts.method = opts.method.toUpperCase();
57487 }
57488 this[kDispatchKey] = buildKey(opts);
57489 this[kDispatches] = mockDispatches;
57490 this[kDefaultHeaders] = {};
57491 this[kDefaultTrailers] = {};
57492 this[kContentLength] = false;
57493 }
57494 createMockScopeDispatchData(statusCode, data, responseOptions = {}) {
57495 const responseData = getResponseData(data);
57496 const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {};
57497 const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };

Callers 2

replyMethod · 0.80

Calls 1

getResponseDataFunction · 0.85

Tested by

no test coverage detected