started testing
This commit is contained in:
@ -1,21 +1,44 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ChangelogComponent } from './changelog.component';
|
||||
import {ApiService} from '../services/api.service';
|
||||
import {ModalService, RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {ValidationService} from '../services/validation.service';
|
||||
import {DataService} from '../services/data.service';
|
||||
|
||||
// TODO
|
||||
|
||||
let apiServiceSpy: jasmine.SpyObj<ApiService>;
|
||||
let modalServiceSpy: jasmine.SpyObj<ModalService>;
|
||||
|
||||
describe('ChangelogComponent', () => {
|
||||
let component: ChangelogComponent;
|
||||
let fixture: ComponentFixture<ChangelogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
const apiSpy = jasmine.createSpyObj('ApiService', ['get']);
|
||||
const modalSpy = jasmine.createSpyObj('ModalService', ['open']);
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ChangelogComponent ]
|
||||
declarations: [ ChangelogComponent ],
|
||||
imports: [
|
||||
],
|
||||
providers: [
|
||||
{provide: ApiService, useValue: apiSpy},
|
||||
{provide: ModalService, useValue: modalSpy}
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
apiServiceSpy = TestBed.inject(ApiService) as jasmine.SpyObj<ApiService>;
|
||||
modalServiceSpy = TestBed.inject(ModalService) as jasmine.SpyObj<ModalService>;
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ChangelogComponent);
|
||||
component = fixture.componentInstance;
|
||||
component.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user