Skip to content

Commit e6e7caa

Browse files
committed
adjust shape test for precision errors
1 parent fcfbf0c commit e6e7caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jasmine/tests/shapes_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,8 @@ describe('A fixed size shape', function() {
11241124
var shapeNodeAfterDrag = getFirstShapeNode();
11251125
var bBoxAfterDrag = shapeNodeAfterDrag.getBoundingClientRect();
11261126
var resizeFactor = shallShrink ? -1 : 1;
1127-
expect(bBoxAfterDrag.height).toBe(bBoxBeforeDrag.height + resizeFactor * Math.abs(dy));
1128-
expect(bBoxAfterDrag.width).toBe(bBoxBeforeDrag.width + resizeFactor * Math.abs(dx));
1127+
expect(bBoxAfterDrag.height).toBeCloseTo(bBoxBeforeDrag.height + resizeFactor * Math.abs(dy));
1128+
expect(bBoxAfterDrag.width).toBeCloseTo(bBoxBeforeDrag.width + resizeFactor * Math.abs(dx));
11291129
assertShapeFullyVisible(shapeNodeAfterDrag);
11301130
})
11311131
.then(done, done.fail);

0 commit comments

Comments
 (0)