How do I properly test a custom icon function?

I have a function that returns a leaflet icon with some properties: addSimpleIcon( iconUrl, iconRetinaUrl: string = null, iconHeight: number = 20, iconWidth: number = 20 ): Icon { const icon: Icon = L.icon({ iconUrl, iconRetinaUrl, iconSize: [iconWidth, iconHeight], shadowSize: [0, 0], iconAnchor: [iconWidth / 2, iconHeight / 2], shadowAnchor: [0, 0], popupAnchor: [0, 0]… Read More How do I properly test a custom icon function?

Karma-jasmine How i test a close function in a modal

I need to test this, but I’m new testing and I do not have idea, I’m working with angular, I just want to test the close function and maybe if it renders. This is the html. <div class="modal active" *ngIf="active" id="modal"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h1 class="modal-title">{{tittle}}</h1> <button type="button" class="close" (click)="close()">… Read More Karma-jasmine How i test a close function in a modal