routerTestModule top-level constant

Module const routerTestModule

The main Router DI module for testing.

Add this module to your test bed for testing your route configuration or components with dependencies on the router.

@GenerateInjector.fromModules([routerTestModule])
final InjectorFactory testInjector = ng.testInjector$Injector;
...
final testBed = NgTestBed(
    ng.TestComponentNgFactory,
    rootInjector: testInjector);

Implementation

const routerTestModule = Module(provide: routerProvidersTest);