I am trying to spy on a function supportsScrollBehavior
of angular platform
service like below -
import * as platform from '@angular/cdk/platform';
describe('Supporting Scroll Behaviour', () => {
beforeEach(() => {
const funcSpy = jasmine.createSpy('supportsScrollBehavior').and.returnValue(true);
spyOnProperty(platform, 'supportsScrollBehavior', 'get').and.returnValue(funcSpy);
});
});
});
But it is giving me an error like below -
Error: supportsScrollBehavior is not declared configurable
In angular 8 it was working fine, but in Angular 9 version it is giving this error. Any pointers will be really helpful.