我无法在测试用例中在线覆盖我不知道如何实现,
我的服务方法是:
public getResults()
{
return this.http(url,body).map(this.mapResponse);
}
private mapResponse(data){
let cleanStatuFilter = JSON.parse(data[0].data.json);
let cleanautoSuggestFilter = JSON.parse(data[1].data.json);
return
{
cards: cleanautoSuggestFilter.csAutoSuggest || [],
actions: cleanStatuFilter.statusTracking || []
};
}
我无法在第二个函数中覆盖return语句 有人可以请求帮助
return
{
cards: cleanautoSuggestFilter.csAutoSuggest || [],
actions: cleanStatuFilter.statusTracking || []
};