Allow negative numbers to be passed to parseHeight function test case fix
This commit is contained in:
parent
3ecc1caab9
commit
ff0c00bc34
1 changed files with 2 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ describe('gridstack utils', function() {
|
||||||
expect(utils.parseHeight('12.3vh')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vh'}));
|
expect(utils.parseHeight('12.3vh')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vh'}));
|
||||||
expect(utils.parseHeight('12.3vw')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vw'}));
|
expect(utils.parseHeight('12.3vw')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vw'}));
|
||||||
expect(utils.parseHeight('12.5')).toEqual(jasmine.objectContaining({height: 12.5, unit: 'px'}));
|
expect(utils.parseHeight('12.5')).toEqual(jasmine.objectContaining({height: 12.5, unit: 'px'}));
|
||||||
|
expect(function() { utils.parseHeight('12.5 df'); }).toThrowError('Invalid height');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should parse negative height value', function() {
|
it('should parse negative height value', function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue