From 4cb3df44ffaa0e850c15165db31434c22650a1d6 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Sat, 29 Aug 2020 11:08:03 -0400 Subject: [PATCH] simplify spec it was confused whether it wanted strings or numbers --- spec/heatmap-spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/heatmap-spec.js b/spec/heatmap-spec.js index 1b8c2f424..a5e0b8815 100644 --- a/spec/heatmap-spec.js +++ b/spec/heatmap-spec.js @@ -225,8 +225,8 @@ describe('dc.heatmap', () => { const reduceDimensionValues = function (dmsn) { return dmsn.top(Infinity).reduce((p, d) => { - p.cols.add(d.colData); - p.rows.add(d.rowData); + p.cols.add(+d.colData); + p.rows.add(+d.rowData); return p; }, {cols: new Set(), rows: new Set()}); }; @@ -245,21 +245,21 @@ describe('dc.heatmap', () => { it('should have the correct number of columns', () => { chart.selectAll('.box-group').each(d => { - expect(originalDomain.cols.has(`${d.key[0]}`)).toBeTruthy(); + expect(originalDomain.cols.has(d.key[0])).toBeTruthy(); }); chart.selectAll('.cols.axis text').each(d => { - expect(originalDomain.cols.has(`${d}`)).toBeTruthy(); + expect(originalDomain.cols.has(d)).toBeTruthy(); }); }); it('should have the correct number of rows', () => { chart.selectAll('.box-group').each(d => { - expect(originalDomain.rows.has(`${d.key[1]}`)).toBeTruthy(); + expect(originalDomain.rows.has(d.key[1])).toBeTruthy(); }); chart.selectAll('.rows.axis text').each(d => { - expect(originalDomain.rows.has(`${d}`)).toBeTruthy(); + expect(originalDomain.rows.has(d)).toBeTruthy(); }); }); });