mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 10:47:59 +08:00
migrated unit tests to Mocha
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user