From ff0c00bc34fa67d6f36d8cdc66e767ae3aba689b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Kremser?= Date: Mon, 29 Feb 2016 23:56:17 -0800 Subject: [PATCH] Allow negative numbers to be passed to parseHeight function test case fix --- spec/utils-spec.js | 2 ++ 1 file changed, 2 insertions(+) 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() {