Skip to content

Commit

Permalink
improved coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonEntholzer committed Nov 9, 2024
1 parent b7c0bb4 commit 5ebcfb2
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ import { MockProvider } from 'ng-mocks';
import { provideHttpClient } from '@angular/common/http';
import { MockTranslateService } from '../../../helpers/mocks/service/mock-translate.service';
import { ScienceService } from 'app/shared/science/science.service';
import { IconDefinition, faFile, faFileCsv, faFileImage, faFilePdf } from '@fortawesome/free-solid-svg-icons';
import {
IconDefinition,
faFile,
faFileArchive,
faFileCode,
faFileCsv,
faFileExcel,
faFileImage,
faFileLines,
faFilePdf,
faFilePen,
faFilePowerpoint,
faFileWord,
} from '@fortawesome/free-solid-svg-icons';

describe('AttachmentUnitComponent', () => {
let scienceService: ScienceService;
Expand Down Expand Up @@ -82,6 +95,13 @@ describe('AttachmentUnitComponent', () => {
['pdf', faFilePdf],
['csv', faFileCsv],
['png', faFileImage],
['zip', faFileArchive],
['txt', faFileLines],
['doc', faFileWord],
['json', faFileCode],
['xls', faFileExcel],
['ppt', faFilePowerpoint],
['odf', faFilePen],
['exotic', faFile],
])('should use correct icon for extension', async (extension: string, icon: IconDefinition) => {
const getAttachmentIconSpy = jest.spyOn(component, 'getAttachmentIcon');
Expand Down

0 comments on commit 5ebcfb2

Please sign in to comment.