feat: Added calculateFontSize method test
This commit is contained in:
parent
b3aab20ac2
commit
afa67c729b
2 changed files with 9 additions and 1 deletions
|
|
@ -93,4 +93,12 @@ describe('Class: Ng2FittextDirective', () => {
|
|||
expect(ng2FittextDirective.getFontSize()).toEqual(1000);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Method: calculateFontSize', () => {
|
||||
it('Should return the font size rounded down', () => {
|
||||
expect(ng2FittextDirective.calculateFontSize(10, 3)).toEqual(3);
|
||||
expect(ng2FittextDirective.calculateFontSize(9, 3)).toEqual(3);
|
||||
expect(ng2FittextDirective.calculateFontSize(8, 3)).toEqual(2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue