Skip to content

Commit 7aa9030

Browse files
committed
update test; parseValueAndUnit defaults to percent when no unit is passed
1 parent cebdc05 commit 7aa9030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

__tests__/parseValueAndUnit.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('Parse a string to get the value and unit in either pixels or percent', ()
66
expect(parseValueAndUnit('52%'))
77
.toEqual({ unit: '%', value: 52 });
88
expect(parseValueAndUnit(13.333))
9-
.toEqual({ unit: null, value: 13.333 });
9+
.toEqual({ unit: '%', value: 13.333 });
1010
expect(parseValueAndUnit('75.8%'))
1111
.toEqual({ unit: '%', value: 75 });
1212
expect(parseValueAndUnit('23.1px'))

0 commit comments

Comments
 (0)