I have a method in-service class which has a GET Call to the backend server and backendserver returns a response of people array with fields - employedID ,name, and busnTitle.
Could you help to cover the below lines?
searchPeople(searchWord: string): Observable<People[]> {
return this.http.get<any>("{URL}").pipe(
map(data => {
if (data) {
return data.persons.map(p => {
return {
eId: p.emplNtId,
name: p.name,
jobTitle: p.busnTitle
};
});
}
})
);
}