Skip to content

Commit a579c20

Browse files
committed
Add test for css calc
1 parent b4c49d6 commit a579c20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/CSSStyleDeclaration.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,4 +547,10 @@ describe('CSSStyleDeclaration', () => {
547547
expect(style.getPropertyValue('--foo')).toEqual('');
548548
expect(style.getPropertyValue('--fOo')).toEqual('purple');
549549
});
550+
551+
test('supports calc', () => {
552+
const style = new CSSStyleDeclaration();
553+
style.setProperty('width', 'calc(100% - 100px)');
554+
expect(style.getPropertyValue('width')).toEqual('calc(100% - 100px)');
555+
});
550556
});

0 commit comments

Comments
 (0)