MCPcopy Create free account
hub / github.com/angular/dev-infra / deleteMockDispatch

Function deleteMockDispatch

github-actions/browserstack/set-browserstack-env.js:11012–11022  ·  view source on GitHub ↗
(mockDispatches, key)

Source from the content-addressed store, hash-verified

11010 const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
11011 const headersMatch = matchHeaders(mockDispatch2, headers);
11012 return pathMatch && methodMatch && bodyMatch && headersMatch;
11013 }
11014 function getResponseData(data) {
11015 if (Buffer.isBuffer(data)) {
11016 return data;
11017 } else if (data instanceof Uint8Array) {
11018 return data;
11019 } else if (data instanceof ArrayBuffer) {
11020 return data;
11021 } else if (typeof data === "object") {
11022 return JSON.stringify(data);
11023 } else {
11024 return data.toString();
11025 }

Callers 2

mockDispatchFunction · 0.70
handleReplyFunction · 0.70

Calls 1

matchKeyFunction · 0.70

Tested by

no test coverage detected