Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing 角8中延迟加载的Karma单元测试用例覆盖率_Unit Testing_Karma Jasmine_Angular8 - Fatal编程技术网

Unit testing 角8中延迟加载的Karma单元测试用例覆盖率

Unit testing 角8中延迟加载的Karma单元测试用例覆盖率,unit-testing,karma-jasmine,angular8,Unit Testing,Karma Jasmine,Angular8,如何在angular 8中编写延迟加载的单元测试用例。我尝试了很多,但是我的单元测试用例没有涵盖“loadChildren”路由 从“@angular/router”导入{Routes,RouterModule}; 从“/app routing.component”导入{AppRoutingComponent} 施工许可:路线=[ {path:“index.html”,组件:AppRoutingComponent} {path:“product”,loadChildren:()=>import(

如何在angular 8中编写延迟加载的单元测试用例。我尝试了很多,但是我的单元测试用例没有涵盖“loadChildren”路由

从“@angular/router”导入{Routes,RouterModule}; 从“/app routing.component”导入{AppRoutingComponent}

施工许可:路线=[

{path:“index.html”,组件:AppRoutingComponent}

{path:“product”,loadChildren:()=>import('app/dashboard/product.module')。然后(m=>m.ProductModule)}

{路径:,重定向到:“/main”,路径匹配:“full”}

导出常量路由组件=[ApprovingComponent

])

@NgModule({
导入:[路由],
导出:[路由模块]

})

导出类AppRoutingModule{}

请提供一些指导

提前谢谢