From: Christopher De Cairos Date: Wed, 1 Jun 2011 22:53:28 +0000 (-0400) Subject: explicitly retur undefined if no trackEvent is found. minor change to tests X-Git-Tag: v0.7^2~53^2~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2565fac054448caf5fd998dffdd4420bf8c922d2;p=popcorn-js.git explicitly retur undefined if no trackEvent is found. minor change to tests --- diff --git a/popcorn.js b/popcorn.js index 06a7b53..387852a 100644 --- a/popcorn.js +++ b/popcorn.js @@ -787,6 +787,7 @@ return o; } } + return undefined; }; Popcorn.getLastTrackEventId = function( obj ) { diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index 2db787f..2327e02 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -1668,7 +1668,7 @@ test("getTrackEvent", function () { popped.removeTrackEvent( oldId ); - equals( popped.getTrackEvent( oldId ) !== true, true, "returned falsy value when id is not defined" ); + equals( popped.getTrackEvent( oldId ) === undefined, true, "returned undefined when id is not found" ); });