From 64cb585fe4bb8fe7626df16315d493647ea2b36a Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Wed, 1 Jun 2011 19:05:13 -0400 Subject: [PATCH] fixed leaking var in unit tests, removed old vars. combined all var declaraitions into the one at the top. fixed single quotes --- test/popcorn.unit.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index 2327e02..0aa4023 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -1615,9 +1615,7 @@ test("getTrackEvent", function () { expect(5); var popped = Popcorn("#video"), - trackIds = [], - historyRef, trackEvents; - + trackIds = [], obj, oldId; Popcorn.plugin("ff", function () { return { @@ -1655,16 +1653,16 @@ test("getTrackEvent", function () { trackIds.push( popped.getLastTrackEventId() ); - var obj = popped.getTrackEvent( trackIds[0] ); + obj = popped.getTrackEvent( trackIds[0] ); - equals( typeof obj === 'object', true, 'getTrackEvent() returned an object' ); + equals( typeof obj === "object", true, "getTrackEvent() returned an object" ); trackIds.forEach (function( id ) { - trackEvent = popped.getTrackEvent( id ); + var trackEvent = popped.getTrackEvent( id ); equals( id, trackEvent._id, "returned the correct TrackEvent"); }); - var oldId = trackIds[trackIds.length - 1]; + oldId = trackIds[trackIds.length - 1]; popped.removeTrackEvent( oldId ); -- 2.43.0