Skip to content

Commit 4fb6fda

Browse files
committed
robustify drawing_test
1 parent bcbee49 commit 4fb6fda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jasmine/tests/drawing_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ describe('Drawing', function() {
355355
afterEach(destroyGraphDiv);
356356

357357
function assertBBox(actual, expected) {
358-
expect(actual.height).toEqual(expected.height, 'height');
359-
expect(actual.top).toEqual(expected.top, 'top');
360-
expect(actual.bottom).toEqual(expected.bottom, 'bottom');
361-
362358
var TOL = 3;
359+
expect(actual.height).toBeWithin(expected.height, TOL, 'height');
360+
expect(actual.top).toBeWithin(expected.top, TOL, 'top');
361+
expect(actual.bottom).toBeWithin(expected.bottom, TOL, 'bottom');
362+
363363
expect(actual.width).toBeWithin(expected.width, TOL, 'width');
364364
expect(actual.left).toBeWithin(expected.left, TOL, 'left');
365365
expect(actual.right).toBeWithin(expected.right, TOL, 'right');

0 commit comments

Comments
 (0)