setup mocha-phantomjs, test runner, and a few Util tests

This commit is contained in:
Eric Rowell
2013-08-28 23:19:29 -07:00
parent 2f0c889b1e
commit 4247553708
4 changed files with 47 additions and 1 deletions

21
test/unit/Util-test.js Normal file
View File

@@ -0,0 +1,21 @@
suite('Util', function(){
var util;
setup(function(){
});
suite('get()', function(){
var get = Kinetic.Util.get;
test('get integer', function(){
assert.equal(get(1, 2), 1);
});
test('default to integer', function(){
assert.equal(get(undefined, 2), 2);
});
test('default to object', function(){
assert.equal(get(undefined, {foo:'bar'}).foo, 'bar');
});
});
});