started testing
This commit is contained in:
		@@ -1,21 +1,40 @@
 | 
			
		||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 | 
			
		||||
 | 
			
		||||
import { ImgMagnifierComponent } from './img-magnifier.component';
 | 
			
		||||
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>;
 | 
			
		||||
 | 
			
		||||
describe('ImgMagnifierComponent', () => {
 | 
			
		||||
  let component: ImgMagnifierComponent;
 | 
			
		||||
  let fixture: ComponentFixture<ImgMagnifierComponent>;
 | 
			
		||||
 | 
			
		||||
  beforeEach(async(() => {
 | 
			
		||||
    const windowSpy = jasmine.createSpyObj('Window', []);
 | 
			
		||||
 | 
			
		||||
    TestBed.configureTestingModule({
 | 
			
		||||
      declarations: [ ImgMagnifierComponent ]
 | 
			
		||||
      declarations: [ ImgMagnifierComponent ],
 | 
			
		||||
      imports: [
 | 
			
		||||
      ],
 | 
			
		||||
      providers: [
 | 
			
		||||
        {provide: Window, useValue: windowSpy}
 | 
			
		||||
      ]
 | 
			
		||||
    })
 | 
			
		||||
    .compileComponents();
 | 
			
		||||
 | 
			
		||||
    windowServiceSpy = TestBed.inject(Window) as jasmine.SpyObj<Window>;
 | 
			
		||||
  }));
 | 
			
		||||
 | 
			
		||||
  beforeEach(() => {
 | 
			
		||||
    fixture = TestBed.createComponent(ImgMagnifierComponent);
 | 
			
		||||
    component = fixture.componentInstance;
 | 
			
		||||
    component.ngOnInit();
 | 
			
		||||
    fixture.detectChanges();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user