diff --git a/spec/utils-spec.js b/spec/utils-spec.js index 3b2b73b..0992767 100644 --- a/spec/utils-spec.js +++ b/spec/utils-spec.js @@ -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.3vw')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vw'})); 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() {