I am doing integration testing of a component.
public ngOnInit() {
this.employeeService.getEmployees()
.subscribe(data => {
this.employees.next(data.json());
});
}
The above code is working fine when serving the project.
But during testing, it is throwing a error saying data.json() is not a function.
You need to mock EmployeeService's getEmployees() method and return same response type object as the original.