Skip to content

Commit

Permalink
oops we still test d3v4 - check version in test
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Jan 28, 2019
1 parent 0202636 commit ec83974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/color-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ describe('dc.colorMixin', function () {
// GIGO: mapping ordinal domain to linear scale is nonsensical
// d3 pre-5.8: scaled to NaN and corrected to black; 5.8+: scale returns undefined
chart.linearColors(['#ff0000','#00ff00']);
expect(colorTest(chart, domain)).toEqual([undefined, undefined, undefined, undefined, undefined]);
if (compareVersions(d3.version, '5.8') === -1) {
expect(colorTest(chart, domain)).toMatchColors(['#000000', '#000000', '#000000', '#000000', '#000000']);
} else {
expect(colorTest(chart, domain)).toEqual([undefined, undefined, undefined, undefined, undefined]);
}
});
});
describe('with numeric domain' , function () {
Expand Down

0 comments on commit ec83974

Please sign in to comment.