Skip to content

Commit

Permalink
test(lib): add unit test for inline title size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Jun 8, 2024
1 parent 1d41608 commit 85818be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/util/text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ describe('calculateInlineTitleSize', () => {
document.body.style.setProperty('--inline-title-size', '2');
expect(calculateInlineTitleSize()).toBe(32);
});

it('should transform `px` to `em` values', () => {
document.body.style.setProperty('--font-text-size', '16px');
document.body.style.setProperty('--inline-title-size', '32px');
expect(calculateInlineTitleSize()).toBe(32);
});
});

describe('isHeader', () => {
Expand Down

0 comments on commit 85818be

Please sign in to comment.