MCPcopy Index your code
hub / github.com/angular/angular / match

Method match

packages/common/http/testing/src/backend.ts:76–85  ·  view source on GitHub ↗

* Search for requests in the list of open requests, and return all that match * without asserting anything about the number of matches.

(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean))

Source from the content-addressed store, hash-verified

74 * without asserting anything about the number of matches.
75 */
76 match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[] {
77 const results = this._match(match);
78 results.forEach((result) => {
79 const index = this.open.indexOf(result);
80 if (index !== -1) {
81 this.open.splice(index, 1);
82 }
83 });
84 return results;
85 }
86
87 /**
88 * Expect that a single outstanding request matches the given matcher, and return

Callers 5

expectOneMethod · 0.95
expectNoneMethod · 0.95
assertNoComplexSizesFunction · 0.45
toDateFunction · 0.45

Calls 3

_matchMethod · 0.95
indexOfMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected