mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
migrated unit tests to Mocha
This commit is contained in:
@@ -2,7 +2,7 @@ suite('Circle', function(){
|
||||
// ======================================================
|
||||
|
||||
test('add circle to stage', function(){
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
var circle = new Kinetic.Circle({
|
||||
@@ -45,7 +45,7 @@ suite('Circle', function(){
|
||||
test('add circle with pattern fill', function(done) {
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
var circle = new Kinetic.Circle({
|
||||
@@ -88,7 +88,7 @@ suite('Circle', function(){
|
||||
|
||||
// ======================================================
|
||||
test('add circle with radial gradient fill', function() {
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
var circle = new Kinetic.Circle({
|
||||
@@ -124,7 +124,7 @@ suite('Circle', function(){
|
||||
|
||||
// ======================================================
|
||||
test('add shape with linear gradient fill', function() {
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
var circle = new Kinetic.Circle({
|
||||
@@ -150,7 +150,7 @@ suite('Circle', function(){
|
||||
|
||||
// ======================================================
|
||||
test('set opacity after instantiation', function() {
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
var circle = new Kinetic.Circle({
|
||||
@@ -173,7 +173,7 @@ suite('Circle', function(){
|
||||
|
||||
// ======================================================
|
||||
test('set fill after instantiation', function() {
|
||||
var stage = buildStage();
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
var circle = new Kinetic.Circle({
|
||||
x: stage.getWidth() / 2,
|
||||
|
Reference in New Issue
Block a user