mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Replace compareNumbers() with equals() and improve numerical tolerance handling in test helpers.
This commit is contained in:
parent
c48f4d772e
commit
318209e9e9
8 changed files with 55 additions and 55 deletions
|
@ -20,8 +20,9 @@ test('PointText', function() {
|
|||
content: 'Hello World!'
|
||||
});
|
||||
compareColors(text.fillColor, new Color(0, 0, 0), 'text.fillColor should be black by default');
|
||||
comparePoints(text.point, { x: 100, y: 100 });
|
||||
compareRectangles(text.bounds, { x: 100, y: 87.4, width: 77, height: 16.8 });
|
||||
comparePoints(text.point, { x: 100, y: 100 }, 'text.point');
|
||||
comparePoints(text.bounds.point, { x: 100, y: 87.4 }, 'text.bounds.point');
|
||||
compareSize(text.bounds.size, { width: 77, height: 16.8 }, 'text.bounds.size', 1.0);
|
||||
equals(function() {
|
||||
return text.hitTest(text.bounds.center) != null;
|
||||
}, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue