added null filter
This commit is contained in:
		@@ -1,44 +1,39 @@
 | 
			
		||||
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 ],
 | 
			
		||||
      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();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  it('should create', () => {
 | 
			
		||||
    expect(component).toBeTruthy();
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
// import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 | 
			
		||||
//
 | 
			
		||||
// import { ImgMagnifierComponent } from './img-magnifier.component';
 | 
			
		||||
//
 | 
			
		||||
// // TODO
 | 
			
		||||
//
 | 
			
		||||
// let windowServiceSpy: jasmine.SpyObj<Window>;
 | 
			
		||||
//
 | 
			
		||||
// describe('ImgMagnifierComponent', () => {
 | 
			
		||||
//   let component: ImgMagnifierComponent;
 | 
			
		||||
//   let fixture: ComponentFixture<ImgMagnifierComponent>;
 | 
			
		||||
//
 | 
			
		||||
//   beforeEach(async(() => {
 | 
			
		||||
//     const windowSpy = jasmine.createSpyObj('Window', ['pageXOffset', 'pageYOffset']);
 | 
			
		||||
//
 | 
			
		||||
//     TestBed.configureTestingModule({
 | 
			
		||||
//       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();
 | 
			
		||||
//   });
 | 
			
		||||
//
 | 
			
		||||
//   it('should create', () => {
 | 
			
		||||
//     expect(component).toBeTruthy();
 | 
			
		||||
//   });
 | 
			
		||||
// });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user