Added testing utils functions

This commit is contained in:
Giuseppe Digilio
2018-07-11 18:42:45 +02:00
parent 10144971f9
commit 683c2f2f6b
13 changed files with 55 additions and 120 deletions

View File

@@ -9,16 +9,7 @@ import { UploaderOptions } from './uploader-options.model';
import { UploaderComponent } from './uploader.component';
import { FileUploadModule } from 'ng2-file-upload';
import { TranslateModule } from '@ngx-translate/core';
function createTestComponent<T>(html: string, type: { new(...args: any[]): T }): ComponentFixture<T> {
TestBed.overrideComponent(type, {
set: {template: html}
});
const fixture = TestBed.createComponent(type);
fixture.detectChanges();
return fixture as ComponentFixture<T>;
}
import { createTestComponent } from '../testing/utils';
describe('Chips component', () => {