From f45fa853e726773d03962330ba138d0f519dbab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 23 Jun 2013 17:54:24 -0700 Subject: [PATCH] Improve new hit-testing test. --- test/tests/HitResult.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/tests/HitResult.js b/test/tests/HitResult.js index 360255a8..57de35df 100644 --- a/test/tests/HitResult.js +++ b/test/tests/HitResult.js @@ -541,7 +541,7 @@ test('Hit testing the corner of a rectangle with miter stroke.', function() { }, true); }); -test('Hit testing invisible items', function() { +test('Hit testing invisible items.', function() { var point = new Point(0, 0); var circle1 = new Path.Circle({ center: point.subtract([25, 0]), @@ -555,14 +555,14 @@ test('Hit testing invisible items', function() { }); equals(function() { - return paper.project.hitTest(point).item; - }, circle2, 'circle2 should be returned.'); + return paper.project.hitTest(point).item === circle2; + }, true); circle2.visible = false; equals(function() { - return paper.project.hitTest(point).item; - }, circle1, 'circle1 should be returned.'); + return paper.project.hitTest(point).item === circle1; + }, true); }); // TODO: project.hitTest(point, {type: AnItemType}); \ No newline at end of file