definma-ui/src/app/img-magnifier/img-magnifier.component.spec.ts

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2020-07-14 15:58:33 +02:00
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ImgMagnifierComponent } from './img-magnifier.component';
2020-08-16 20:01:56 +02:00
import {ApiService} from '../services/api.service';
import {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 windowServiceSpy: jasmine.SpyObj<Window>;
2020-07-14 15:58:33 +02:00
describe('ImgMagnifierComponent', () => {
let component: ImgMagnifierComponent;
let fixture: ComponentFixture<ImgMagnifierComponent>;
beforeEach(async(() => {
2020-08-16 20:01:56 +02:00
const windowSpy = jasmine.createSpyObj('Window', []);
2020-07-14 15:58:33 +02:00
TestBed.configureTestingModule({
2020-08-16 20:01:56 +02:00
declarations: [ ImgMagnifierComponent ],
imports: [
],
providers: [
{provide: Window, useValue: windowSpy}
]
2020-07-14 15:58:33 +02:00
})
.compileComponents();
2020-08-16 20:01:56 +02:00
windowServiceSpy = TestBed.inject(Window) as jasmine.SpyObj<Window>;
2020-07-14 15:58:33 +02:00
}));
beforeEach(() => {
fixture = TestBed.createComponent(ImgMagnifierComponent);
component = fixture.componentInstance;
2020-08-16 20:01:56 +02:00
component.ngOnInit();
2020-07-14 15:58:33 +02:00
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});