Skip to content

Commit

Permalink
Testing the vjs.obj.isArray videojs#1195
Browse files Browse the repository at this point in the history
Adding test for the vjs.obj.isArray method
  • Loading branch information
shmulik committed May 20, 2014
1 parent f930032 commit f3089bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ test('should copy an object', function(){
deepEqual(asdf,fdsa);
});

test('should check if an object is an Array', function(){
var arr = ["a", "b", "c"];
ok(vjs.obj.isArray(arr) === true, 'Arr object is an Array');

var obj = {};
ok(vjs.obj.isArray(arr) === false, 'Obj is not an Array');
});

test('should check if an object is plain', function(){
var empty = {};
ok(vjs.obj.isPlain(empty) === true, 'Empty object is plain');
Expand Down

0 comments on commit f3089bb

Please sign in to comment.