Skip to content

Commit dd15d66

Browse files
committed
test: add tests for more unit types
1 parent f5eaea1 commit dd15d66

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,19 @@ test(
292292
testValue('calc(1cqmax + 3cqmax)', '4cqmax')
293293
);
294294

295+
test(
296+
'should add expressions with svh units',
297+
testValue(
298+
'calc(98% - 1.5rem - (85svh/8.2 + 1.9rem + 1.65svh))',
299+
'calc(98% - 3.4rem - 12.01585svh)'
300+
)
301+
);
302+
303+
test(
304+
'should not combine different viewport units',
305+
testValue('calc(100svmax - 44.5svh)', 'calc(100svmax - 44.5svh)')
306+
);
307+
295308
test(
296309
'should parse fractions without leading zero',
297310
testValue('calc(2rem - .14285em)', 'calc(2rem - 0.14285em)')

0 commit comments

Comments
 (0)