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

Function buildKey

github-actions/browserstack/set-browserstack-env.js:11023–11032  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

11021 if (pathSegments.length !== 2) {
11022 return path4;
11023 }
11024 const qp = new URLSearchParams(pathSegments.pop());
11025 qp.sort();
11026 return [...pathSegments, qp.toString()].join("?");
11027 }
11028 function matchKey(mockDispatch2, { path: path4, method, body, headers }) {
11029 const pathMatch = matchValue(mockDispatch2.path, path4);
11030 const methodMatch = matchValue(mockDispatch2.method, method);
11031 const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
11032 const headersMatch = matchHeaders(mockDispatch2, headers);
11033 return pathMatch && methodMatch && bodyMatch && headersMatch;
11034 }
11035 function getResponseData(data) {

Callers 2

mockDispatchFunction · 0.70
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected