Can anyone shed some light on this error I'm seeing in my Jasmine unit tests where I'm creating a spy on a mock service call and trying to return a value?
This is an example of the spy:
mockService = jasmine.createSpyObj('MyService', ['getSomeId']);
mockService.getSomeId.and.returnValue(10);
When i run ng test, the following error shows up in the console window - but the test actually passes successfully in the browser:
error TS2339: Property 'and' does not exist on type '() => string'. src/app/services/myservice.service.spec.ts(57,45): error TS2339: Property 'and' does not exist on type '(controller: string) => string'.
Any ideas?