import { HDComponent } from '../components/hd-component'; import { Store } from '@ngrx/store'; import { State } from '@core/reducers'; describe('HDComponent', () => { let component: HDComponent; let storeMock: jasmine.SpyObj>; beforeEach(() => { storeMock = jasmine.createSpyObj>('Store', ['dispatch']); component = new HDComponent(storeMock, 'testComponent'); }); it('should have created', () => { expect(component).toBeDefined(); }); it('should have ngAfterViewInit', () => { expect(component.ngAfterViewInit).toBeDefined(); }); it('should returned key', () => { const result = component.ngAfterViewInit(); expect(result).toEqual('HD_COMPONENT'); }); });