MCPcopy
hub / github.com/angular/angular / compareSegments

Function compareSegments

packages/router/test/apply_redirects.spec.ts:1929–1938  ·  view source on GitHub ↗
(actual: UrlSegmentGroup, expected: UrlSegmentGroup, error: string)

Source from the content-addressed store, hash-verified

1927}
1928
1929function compareSegments(actual: UrlSegmentGroup, expected: UrlSegmentGroup, error: string): void {
1930 expect(actual).toBeDefined(error);
1931 expect(equalSegments(actual.segments, expected.segments)).toEqual(true, error);
1932
1933 expect(Object.keys(actual.children).length).toEqual(Object.keys(expected.children).length, error);
1934
1935 Object.keys(expected.children).forEach((key) => {
1936 compareSegments(actual.children[key], expected.children[key], error);
1937 });
1938}
1939
1940class ComponentA {}
1941class ComponentB {}

Callers 1

expectTreeToBeFunction · 0.70

Calls 3

equalSegmentsFunction · 0.90
keysMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…