我有一个功能
getLocations() {
debugger;
this.spinnerService.displayLoader(true);
this.locService.getLocation()
.subscribe((data) => {
this.facilityLocationsResMain = data;
this.locations = this.facilityLocationsResMain.facilityLocationsRes;
console.log("Locations", this.facilityLocationsResMain);
this.mapFacility();
this.spinnerService.displayLoader(false);
}, (error) => {
this.spinnerService.displayLoader(false);
this.router.navigate(['error']);
});
}
有人可以帮助如何为此编写测试用例并在同一测试用例或不同的测试用例中调用 mapFacility
函数吗?