Fix test suite

This commit is contained in:
Lorenzo Iovino 2024-01-10 00:31:48 +01:00
parent 8208f7fb5f
commit f4f5ccdbf0
6 changed files with 7 additions and 160 deletions

View file

@ -297,7 +297,9 @@ describe('Class: Ng2FittextDirective', () => {
});
it('Should calculate the overflow using the parent element if the container is not present', () => {
delete ng2FittextDirective.container;
if(ng2FittextDirective) {
delete (ng2FittextDirective as any).container;
}
spyOn(ng2FittextDirective, 'checkOverflow').and.callFake(
(parentElement: any, childrenElement: any) => {
expect(parentElement).toEqual(parentElementMock);