Index

src/lib/route.ts

fakeRoute
fakeRoute(options: undefined)

Creates a fake partial ActivatedRoute for tests.

If you pass params, then the created route's paramMap will contain the same values. The same goes for queryParams and queryParamMap.

If you pass a parent route and a snapshot, and the passed snapshot doesn't have a parent, then the snapshot's parent will be set to the parent route snapshot. This allows the code under test to use route.parent.snapshot or route.snapshot.parent.

If you pass a snapshot with a parent, but don't pass a parent or pass a parent without snapshot, then the route's parent snapshot will be set to the given snapshot's parent. This allows the code under test to use route.parent.snapshot or route.snapshot.parent.

Parameters :
Name Optional
options no
fakeSnapshot
fakeSnapshot(options: undefined)

Creates a fake partial ActivatedRouteSnapshot for tests.

If you pass params, then the created snapshot's paramMap will contain the same values. The same goes for queryParams and queryParamMap.

Parameters :
Name Optional
options no

results matching ""

    No results matching ""