mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Start cleaning up unit tests by introducing new class/type-based comparators lookup table.
This commit is contained in:
parent
28538d8a43
commit
e95e17826e
7 changed files with 122 additions and 106 deletions
|
@ -22,7 +22,7 @@ test('PointText', function() {
|
|||
compareColors(text.fillColor, new Color(0, 0, 0), 'text.fillColor should be black by default');
|
||||
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);
|
||||
compareSize(text.bounds.size, { width: 77, height: 16.8 }, 'text.bounds.size', { tolerance: 1.0 });
|
||||
equals(function() {
|
||||
return text.hitTest(text.bounds.center) != null;
|
||||
}, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue