Skip to content

Commit

Permalink
improve test code
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Nov 30, 2020
1 parent a19b05b commit 8ebfa71
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/jasmine/tests/image_test.js
Expand Up @@ -669,15 +669,15 @@ describe('image hover:', function() {
});

[
['auto', 'auto'],
['auto', 'reversed'],
['reversed', 'auto'],
['reversed', 'reversed']
[[0, 512], [0, 512]],
[[0, 512], [512, 0]], // the default image layout
[[512, 0], [0, 512]],
[[512, 0], [512, 0]]
].forEach(function(test) {
it('should show correct hover info regardless of axis directions ' + test, function(done) {
var mockCopy = Lib.extendDeep({}, mock);
mockCopy.layout.xaxis.autorange = test[0];
mockCopy.layout.yaxis.autorange = test[1];
mockCopy.layout.xaxis.range = test[0];
mockCopy.layout.yaxis.range = test[1];
mockCopy.data[0].colormodel = 'rgba';
mockCopy.data[0].hovertemplate = '%{z}<extra></extra>';
Plotly.newPlot(gd, mockCopy)
Expand Down

1 comment on commit 8ebfa71

@archmoj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please keep (expand) the old test with autorange and add new tests with defined ranges?

Please sign in to comment.