Skip to content

Commit

Permalink
simplify spec
Browse files Browse the repository at this point in the history
it was confused whether it wanted strings or numbers
  • Loading branch information
gordonwoodhull committed Aug 29, 2020
1 parent 4d51a97 commit 4cb3df4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/heatmap-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()});
};
Expand All @@ -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();
});
});
});
Expand Down

0 comments on commit 4cb3df4

Please sign in to comment.