better extend function

This commit is contained in:
lavrton
2015-01-20 17:22:51 +07:00
parent 46bb48e470
commit 87236a88e2
7 changed files with 95 additions and 58 deletions

View File

@@ -689,4 +689,12 @@ suite('Shape', function() {
//TODO: can't get this to pass
assert.equal(click, true, 'click event should have been fired when mousing down and then up on rect');
});
test('class inherince', function() {
var rect = new Kinetic.Rect();
assert.equal(rect instanceof Kinetic.Rect, true);
assert.equal(rect instanceof Kinetic.Shape, true);
assert.equal(rect instanceof Kinetic.Node, true);
});
});

View File

@@ -1,6 +1,4 @@
suite('Util', function(){
var util;
test('get()', function(){
assert.equal(Kinetic.Util.get(1, 2), 1);
assert.equal(Kinetic.Util.get(undefined, 2), 2);