Skip to content

Commit e61a178

Browse files
committed
Use precise range assertions in multi-axis shapes test
1 parent 7fa1164 commit e61a178

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/jasmine/tests/shapes_test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,14 +1919,14 @@ describe('Test multi-axis shapes', function() {
19191919
x0: 0, x1: 5, y0: 0, y1: 5
19201920
}]
19211921
}).then(function() {
1922-
expect(gd._fullLayout.xaxis.range[0]).toBeLessThan(0);
1923-
expect(gd._fullLayout.xaxis.range[1]).toBeGreaterThan(2);
1924-
expect(gd._fullLayout.yaxis.range[0]).toBeLessThan(0);
1925-
expect(gd._fullLayout.yaxis.range[1]).toBeGreaterThan(2);
1926-
expect(gd._fullLayout.xaxis2.range[0]).toBeLessThan(1);
1927-
expect(gd._fullLayout.xaxis2.range[1]).toBeGreaterThan(5);
1928-
expect(gd._fullLayout.yaxis2.range[0]).toBeLessThan(1);
1929-
expect(gd._fullLayout.yaxis2.range[1]).toBeGreaterThan(5);
1922+
expect(gd._fullLayout.xaxis.range[0]).toBeCloseTo(-0.01);
1923+
expect(gd._fullLayout.xaxis.range[1]).toBeCloseTo(2.14);
1924+
expect(gd._fullLayout.yaxis.range[0]).toBeCloseTo(-0.02);
1925+
expect(gd._fullLayout.yaxis.range[1]).toBeCloseTo(2.18);
1926+
expect(gd._fullLayout.xaxis2.range[0]).toBeCloseTo(0.72);
1927+
expect(gd._fullLayout.xaxis2.range[1]).toBeCloseTo(5.02);
1928+
expect(gd._fullLayout.yaxis2.range[0]).toBeCloseTo(0.64);
1929+
expect(gd._fullLayout.yaxis2.range[1]).toBeCloseTo(5.04);
19301930
})
19311931
.then(done, done.fail);
19321932
});

0 commit comments

Comments
 (0)