diff --git a/test/tests/TextItem.js b/test/tests/TextItem.js new file mode 100644 index 00000000..6d351d5f --- /dev/null +++ b/test/tests/TextItem.js @@ -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'); +}); diff --git a/test/tests/load.js b/test/tests/load.js index dbd24c4d..4366db01 100644 --- a/test/tests/load.js +++ b/test/tests/load.js @@ -42,6 +42,8 @@ /*#*/ include('Raster.js'); +/*#*/ include('TextItem.js'); + /*#*/ include('HitResult.js'); /*#*/ include('SVGImport.js');