I am trying to test my angular 4.1.0 component -
export class CellComponent implements OnInit {
lines: Observable>;
@Input() dep
I also had this error, which truth be told is fairly non talkative.
It was related to the HTTP calls trough my services
I use myService.ts with 2 methods
get();
getAll();
I am mocking this service : mockMyService.ts
The error was here because my component was using getAll() method that I forgot to implement in the mockMyService, so I just added the method :
private mockObjects = [
{
'id': '1',
'champ1': 'TECH',
'champ2': 2,
'champ3': 'Data bidon'
},
{
'id': '2',
'champ1': 'TECH',
'champ2': 2,
'champ3': 'Data au pif'
},
{
'id': '3',
'champ1': 'FUNC',
'champ2': 3,
'champ3': 'Data quelconque'
},
];
getAll(): Observable {
return Observable.of(this.mockObjects);
}
Error was gone :)