Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking instanceof Arrays cross frames (needed for the vjs.Player.prototype.src method) #1218

Closed
wants to merge 7 commits into from
Prev Previous commit
Next Next commit
Testing the vjs.obj.isArray #1195
Adding test for the vjs.obj.isArray method
  • Loading branch information
shmulik committed May 20, 2014
commit f3089bb5fd61ab8268aa901fd0f83a497f71e447
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