How to write the unit test cases for lazy loading in angular 8. i tried a lot but my unit test cases are not covering "loadChildren" routing.
import { Routes, RouterModule } from "@angular/router"; import { AppRoutingComponent } from "./app-routing.component";
const appRoutes: Routes = [
{ path: "index.html", component: AppRoutingComponent },
{ path: "product", loadChildren: () => import('app/dashboard/product.module').then(m => m.ProductModule) },
{ path: "", redirectTo: "/main", pathMatch: "full" } ];
export const routedComponents = [ AppRoutingComponent,
];
@NgModule({
imports: [routing],
exports: [RouterModule]
})
export class AppRoutingModule { }
Please provide some guidance.
Thanks in advance.