Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff0c00b

Browse files
committed
Allow negative numbers to be passed to parseHeight function test case fix
1 parent 3ecc1ca commit ff0c00b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/utils-spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ describe('gridstack utils', function() {
9090
expect(utils.parseHeight('12.3vh')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vh'}));
9191
expect(utils.parseHeight('12.3vw')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vw'}));
9292
expect(utils.parseHeight('12.5')).toEqual(jasmine.objectContaining({height: 12.5, unit: 'px'}));
93+
expect(function() { utils.parseHeight('12.5 df'); }).toThrowError('Invalid height');
94+
9395
});
9496

9597
it('should parse negative height value', function() {

0 commit comments

Comments
 (0)