migrated unit tests to Mocha

This commit is contained in:
Eric Rowell
2013-09-08 21:36:54 -07:00
parent 1d586098dd
commit 400fae734d
18 changed files with 810 additions and 831 deletions

View File

@@ -1,7 +1,7 @@
suite('Label', function() {
// ======================================================
test('add label', function() {
var stage = buildStage();
var stage = addStage();
var layer = new Kinetic.Layer();
var label = new Kinetic.Label({
@@ -69,7 +69,7 @@ suite('Label', function() {
// ======================================================
test('create label from json', function() {
var stage = buildStage();
var stage = addStage();
var json = '{"attrs":{"x":100,"y":100,"draggable":true},"className":"Label","children":[{"attrs":{"fill":"#bbb","stroke":"#333","shadowColor":"black","shadowBlur":10,"shadowOffsetX":10,"shadowOffsetY":10,"shadowOpacity":0.2,"lineJoin":"round","pointerDirection":"up","pointerWidth":20,"pointerHeight":20,"cornerRadius":5,"x":-151.5,"y":20,"width":303,"height":60},"className":"Tag"},{"attrs":{"text":"Hello big world","fontSize":50,"lineHeight":1.2,"fill":"green","width":"auto","height":"auto","x":-151.5,"y":20},"className":"Text"}]}';
var layer = new Kinetic.Layer();