Skip to content

Commit

Permalink
Adding frontend test for unsupported units in min font size config
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Dec 15, 2022
1 parent dff191d commit d9531c2
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,21 @@ describe( 'typography utils', () => {
expected: 'clamp(30px, 1.875rem + ((1vw - 7.68px) * 1), 30px)',
},

{
message:
'should use default min font size value where min font size unit in fluid config is not supported',
preset: {
size: '15px',
},
typographySettings: {
fluid: {
minFontSize: '16%',
},
},
expected:
'clamp(14px, 0.875rem + ((1vw - 7.68px) * 0.12), 15px)',
},

// Equivalent custom config PHP unit tests in `test_should_covert_font_sizes_to_fluid_values()`.
{
message: 'should return clamp value using custom fluid config',
Expand Down

0 comments on commit d9531c2

Please sign in to comment.