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

Function buildKey

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

Source from the content-addressed store, hash-verified

11021 } else if (typeof data === "object") {
11022 return JSON.stringify(data);
11023 } else {
11024 return data.toString();
11025 }
11026 }
11027 function getMockDispatch(mockDispatches, key) {
11028 const basePath = key.query ? buildURL(key.path, key.query) : key.path;
11029 const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
11030 let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path4 }) => matchValue(safeUrl(path4), resolvedPath));
11031 if (matchedMockDispatches.length === 0) {
11032 throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
11033 }
11034 matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method));
11035 if (matchedMockDispatches.length === 0) {

Callers 2

mockDispatchFunction · 0.70
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected