diff --git a/test/jasmine/tests/heatmap_test.js b/test/jasmine/tests/heatmap_test.js index c9a72894da9..1889016a1a6 100644 --- a/test/jasmine/tests/heatmap_test.js +++ b/test/jasmine/tests/heatmap_test.js @@ -302,6 +302,18 @@ describe('heatmap calc', function() { expect(out.y).toBeCloseToArray([-0.5, 0.5, 1.5]); expect(out.z).toBeCloseTo2DArray([[1, 2, 3], [3, 1, 2]]); }); + + it('should handle the category case', function() { + var out = _calc({ + x: ['a', 'b', 'c'], + y: ['z'], + z: [[17, 18, 19]] + }); + + expect(out.x).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]); + expect(out.y).toBeCloseToArray([-0.5, 0.5]); + expect(out.z).toBeCloseTo2DArray([[17, 18, 19]]); + }); }); describe('heatmap plot', function() {