我正在尝试为扩展基类的组件编写单元测试。
组件.ts
export class DesktopPresentationAreaComponent extends AbstractPresentationComponent {
constructor() {
super(store, webcast);
}
}
基类
export abstract class AbstractPresentationComponent {
constructor(protected store: MainStorageService,
protected webcast: WebcastService) {
this.store.get('state').subscribe();
}
当我运行“ng test”时,它显示以下错误。
TypeError: Cannot read property 'subscribe' of undefined in AbstractPresentationComponent
我该如何解决这个问题?