mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Start implementing unit tests for TextItem / PointText.
One failing already.
This commit is contained in:
parent
d1932124d7
commit
13d97796aa
2 changed files with 24 additions and 0 deletions
22
test/tests/TextItem.js
Normal file
22
test/tests/TextItem.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
|
||||
* http://lehni.org/ & http://jonathanpuckey.com/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
module('TextItem');
|
||||
|
||||
test('PointText', function() {
|
||||
var text = new PointText({
|
||||
point: [100, 100],
|
||||
content: 'Hello World!'
|
||||
});
|
||||
equals(text.point, { x: 100, y: 100 });
|
||||
equals(text.fillColor, 'black', 'text.fillColor should be black by default');
|
||||
});
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
/*#*/ include('Raster.js');
|
||||
|
||||
/*#*/ include('TextItem.js');
|
||||
|
||||
/*#*/ include('HitResult.js');
|
||||
|
||||
/*#*/ include('SVGImport.js');
|
||||
|
|
Loading…
Reference in a new issue