From ded6de9a0c3958f5002e633010e270bfbaec34af Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Mon, 12 Sep 2011 14:11:47 -0400 Subject: [PATCH] added Popcorn.p.cue as an alias for exec [#715] --- popcorn.js | 4 +++- test/popcorn.unit.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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(); -- 2.43.0