]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
removed unused var, moved prop declaration to top of method, fixed styles, fixed... t299
authorChristopher De Cairos <chris.decairos@gmail.com>
Mon, 13 Jun 2011 15:58:12 +0000 (11:58 -0400)
committerChristopher De Cairos <chris.decairos@gmail.com>
Mon, 13 Jun 2011 15:58:12 +0000 (11:58 -0400)
test/popcorn.unit.js

index ab2c99b6ae60ff088c07add0d87fcf315e65f0bf..96120d84f1bfb73ccc61607a7c65d78b61cdcad0 100644 (file)
@@ -511,29 +511,31 @@ test( "Popcorn.extend", function () {
         "key22" : 9002,
         "key23" : function() { return false; }
       },
-      obj3 = Popcorn.extend(dest, obj1);
+      prop;
+  
+  Popcorn.extend( dest, obj1 );
   
   for ( prop in obj1 ) {
-    equal ( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop );
+    equal( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop );
   }
   
-  equal ( typeof dest["key13"], "function","dest[key13] is a function");
+  equal( typeof dest[ "key13" ], "function", "dest[key13] is a function" );
   
   dest = {};
   
-  obj3 = Popcorn.extend( dest, obj1, obj2 );
+  Popcorn.extend( dest, obj1, obj2 );
   
-  for ( var prop in obj1 ) {
-    equal ( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop + ", when extending 2 objects" );
+  for ( prop in obj1 ) {
+    equal( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop + ", when extending 2 objects" );
   }
 
-  for ( var prop in obj2 ) {
-    equal ( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop + ", when extending 2 objects" );
+  for ( prop in obj2 ) {
+    equal( dest.hasOwnProperty( prop ), true, "{dest} has property: " + prop + ", when extending 2 objects" );
   }
   
-  equal ( typeof dest["key13"], "function","dest[key13] is a function");
+  equal( typeof dest[ "key13" ], "function", "dest[key13] is a function" );
   
-  equal ( typeof dest["key23"], "function","dest[key23] is a function");
+  equal( typeof dest[ "key23" ], "function", "dest[key23] is a function" );
   
 });
 
@@ -565,7 +567,7 @@ test( "Popcorn.events", function() {
 
   ok( okay, "Native events are correctly being handled");
 
-  equals( typeof Popcorn.Events.Natives, "string", "Popcorn.Events.Natives is an object" );
+  equals( typeof Popcorn.Events.Natives, "string", "Popcorn.Events.Natives is an string" );
   equals( typeof Popcorn.events, "object", "Popcorn.events is an object" );
 
   Popcorn.forEach( eventsReturned, function ( e ) {