MCPcopy
hub / github.com/angular/angular / checkActivatedRoute

Function checkActivatedRoute

packages/router/test/recognize.spec.ts:1168–1183  ·  view source on GitHub ↗
(
  actual: ActivatedRouteSnapshot,
  url: string,
  params: Params,
  cmp: Function | null,
  outlet: string = PRIMARY_OUTLET,
)

Source from the content-addressed store, hash-verified

1166}
1167
1168function checkActivatedRoute(
1169 actual: ActivatedRouteSnapshot,
1170 url: string,
1171 params: Params,
1172 cmp: Function | null,
1173 outlet: string = PRIMARY_OUTLET,
1174): void {
1175 if (actual === null) {
1176 expect(actual).not.toBeNull();
1177 } else {
1178 expect(actual.url.map((s) => s.path).join('/')).toEqual(url);
1179 expect(actual.params).toEqual(params);
1180 expect(actual.component).toBe(cmp);
1181 expect(actual.outlet).toEqual(outlet);
1182 }
1183}
1184
1185function tree(url: string): UrlTree {
1186 return new DefaultUrlSerializer().parse(url);

Callers 1

recognize.spec.tsFile · 0.70

Calls 2

mapMethod · 0.80
joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…