From 21df51e7a9cbdef560dd474fe8f342bcb118e304 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Feb 2011 14:21:45 -0500 Subject: [PATCH] fixed comments and variables in unit test --- popcorn.js | 4 ++-- test/popcorn.unit.js | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/popcorn.js b/popcorn.js index e6344ae..ff6dd32 100644 --- a/popcorn.js +++ b/popcorn.js @@ -40,7 +40,7 @@ }; - //addes a Popcorn instance to the Popcorn instance array + // Addes a Popcorn instance to the Popcorn instance array Popcorn.addInstance = function( popcornInstance ) { if ( !popcornInstance.video.id ) { @@ -55,7 +55,7 @@ }; - //User passes in the name of the Popcorn instance and receive a popcorn object + // User passes in the name of the Popcorn instance and receive a popcorn object Popcorn.getInstanceById = function( name ) { return Popcorn.instances[ Popcorn.instanceIds[ name ] ]; diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index c016b4a..66e1ce4 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -69,11 +69,10 @@ test("Utility", function () { }); test("Instances", function() { - var popped = Popcorn("#video"); - var popped2 = Popcorn("#video"); - var popped3 = Popcorn("#video"); - var expects = 9, - count = 0; + var popped = Popcorn("#video"), + expects = 9, + count = 0, + instance; expect(expects); @@ -100,7 +99,6 @@ test("Instances", function() { ok( "length" in Popcorn.instances && "join" in Popcorn.instances, "Popcorn.instances is a provided cache array"); plus(); - var instance; instance = Popcorn.getInstanceById("video"); ok( instance.video, "Stored instance as a `video` property" ); @@ -112,7 +110,7 @@ test("Instances", function() { ok( instance instanceof Popcorn, "Instance instanceof Popcorn" ); plus(); - ok( 3 === Popcorn.instances.length, "There are the correct number of Popcorn instances" ); + equal( Popcorn.instances.length, 1, "There are the correct number of Popcorn instances" ); plus(); }); -- 2.43.0