]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
added Popcorn.p.cue as an alias for exec [#715]
authorChristopher De Cairos <chris.decairos@gmail.com>
Mon, 12 Sep 2011 18:11:47 +0000 (14:11 -0400)
committerChristopher De Cairos <chris.decairos@gmail.com>
Mon, 12 Sep 2011 18:11:47 +0000 (14:11 -0400)
popcorn.js
test/popcorn.unit.js

index a17798293a6ce3fe90290bf1a5653e8223cdcf24..8ce92f606339160840f5c5a4080566c7bd57e9e8 100644 (file)
       }
     }
   };
-
+  
+  // alias for exec function
+  Popcorn.p.cue = Popcorn.p.exec;
 
   //  Exposes Popcorn to global context
   global.Popcorn = Popcorn;
index 89855e7d552a777251893403ca4a636faa6ce166..5d8c188efaceba35f223e19ef49f0ef82fd3bf98 100644 (file)
@@ -511,7 +511,7 @@ test("exec", function() {
       hasLooped = false,
       loop = 0;
 
-  expect( expects + 1 );
+  expect( expects + 4 );
 
   function plus(){
     if ( ++count == expects ) {
@@ -519,6 +519,9 @@ test("exec", function() {
       setTimeout( function() {
 
         equals( loop, expects, "exec callback repeat check, only called twice" );
+        ok( Popcorn.p.cue, "Popcorn.p.cue exists" );
+                               equal( typeof Popcorn.p.cue, "function", "Popcorn.p.cue is a function" );
+                               deepEqual( Popcorn.p.cue, Popcorn.p.exec, "Popcorn.p.cue equals Popcorn.p.exec" );
         Popcorn.removePlugin( popped, "exec" );
         start();