mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user