From: Christopher De Cairos Date: Mon, 12 Sep 2011 18:11:47 +0000 (-0400) Subject: added Popcorn.p.cue as an alias for exec [#715] X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ded6de9a0c3958f5002e633010e270bfbaec34af;p=popcorn-js.git added Popcorn.p.cue as an alias for exec [#715] --- diff --git a/popcorn.js b/popcorn.js index a177982..8ce92f6 100644 --- a/popcorn.js +++ b/popcorn.js @@ -1794,7 +1794,9 @@ } } }; - + + // alias for exec function + Popcorn.p.cue = Popcorn.p.exec; // Exposes Popcorn to global context global.Popcorn = Popcorn; diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index 89855e7..5d8c188 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -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();