fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -31,10 +31,10 @@ describe('Test Img viewer component ', () => {
let fixture: ComponentFixture<ImgViewerComponent>;
let element: HTMLElement;
function createFakeBlob() {
const createFakeBlob = () => {
const data = atob('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');
return new Blob([data], { type: 'image/png' });
}
};
setupTestBed({
imports: [
@@ -86,7 +86,7 @@ describe('Test Img viewer component ', () => {
it('If no url or blob are passed should thrown an error', () => {
const change = new SimpleChange(null, null, true);
expect(() => {
component.ngOnChanges({ 'blobFile': change });
component.ngOnChanges({ blobFile: change });
}).toThrow(new Error('Attribute urlFile or blobFile is required'));
});
@@ -109,7 +109,7 @@ describe('Test Img viewer component ', () => {
spyOn(service, 'createTrustedUrl').and.returnValue('fake-blob-url');
const change = new SimpleChange(null, blob, true);
expect(() => {
component.ngOnChanges({ 'blobFile': change });
component.ngOnChanges({ blobFile: change });
}).not.toThrow(new Error('Attribute urlFile or blobFile is required'));
expect(component.urlFile).toEqual('fake-blob-url');
});
@@ -163,7 +163,7 @@ describe('Test Img viewer component ', () => {
component = fixture.componentInstance;
component.blobFile = createFakeBlob();
const change = new SimpleChange(null, component.blobFile, true);
component.ngOnChanges({ 'blobFile': change });
component.ngOnChanges({ blobFile: change });
fixture.detectChanges();
});