There is an error in one my spec files:
const a = jasmine.createSpyObj<AppService>('as', ['getAppsForUserByRoleObservable']); const msMock = jasmine.createSpyObj<MediaService>('ms', ['getMediaSuffix']); const observable = new BehaviorSubject(MediaSuffix.Lg); msMock.getMediaSuffix.and.returnValue(observable);
It showing an error for "observable" on the last line. Putting my cursor over gives this error: "Argument of type 'BehaviorSubject' is not assignable to parameter of type 'Observable'. Type 'BehaviorSubject' is missing the following properties from type 'Observable': _isScalar, _trySubscribe, _subscribe"
How do I fix this?
I have tried adding an "of" from rxjs, but it did not work.
BehaviorSubject
to an Observable using asObservable()