diff --git a/plugins/googlefeed/popcorn.googlefeed.unit.js b/plugins/googlefeed/popcorn.googlefeed.unit.js index 3b8817f3..bb612bff 100755 --- a/plugins/googlefeed/popcorn.googlefeed.unit.js +++ b/plugins/googlefeed/popcorn.googlefeed.unit.js @@ -27,7 +27,7 @@ test( "Popcorn Google Feed Plugin", function() { end: 2, target: "feed", url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml", - title: "Planet Feed", + title: "Planet Feed" }) .googlefeed({ start: 2, diff --git a/plugins/linkedin/popcorn.linkedin.unit.js b/plugins/linkedin/popcorn.linkedin.unit.js index 3c0cdd63..47e422e7 100755 --- a/plugins/linkedin/popcorn.linkedin.unit.js +++ b/plugins/linkedin/popcorn.linkedin.unit.js @@ -1,5 +1,12 @@ test( "Popcorn LinkedIn Plugin", function() { + function plus() { + + if ( ++count === expects ) { + start(); + } + } + if ( /localhost/.test( location.hostname ) ) { // run tests on localhost @@ -15,13 +22,6 @@ test( "Popcorn LinkedIn Plugin", function() { expect( expects ); - function plus() { - - if ( ++count === expects ) { - start(); - } - } - stop(); ok( "linkedin" in popped, "linkedin is a method of the popped instance" ); diff --git a/plugins/mustache/popcorn.mustache.unit.js b/plugins/mustache/popcorn.mustache.unit.js index 1829511f..3ef5edce 100755 --- a/plugins/mustache/popcorn.mustache.unit.js +++ b/plugins/mustache/popcorn.mustache.unit.js @@ -41,7 +41,7 @@ test( "Popcorn Mustache Plugin", function() { data: function( plugin, options ) { return JSON.parse( '{"heading": "mustache - test 2/3"}' ); }, - target: "mustache-div", + target: "mustache-div" }); // Template + Object literal @@ -57,7 +57,8 @@ test( "Popcorn Mustache Plugin", function() { }); var video = document.getElementById( "video" ); - var two = six = ten = false; + var two, six, ten; + two = six = ten = false; video.addEventListener( "timeupdate", function() { diff --git a/plugins/openmap/popcorn.openmap.unit.js b/plugins/openmap/popcorn.openmap.unit.js index 21cd6aa9..220edb5e 100755 --- a/plugins/openmap/popcorn.openmap.unit.js +++ b/plugins/openmap/popcorn.openmap.unit.js @@ -39,7 +39,7 @@ test( "Popcorn OpenMap Plugin", function() { start: 0, end: 4, type: "SATELLITE", - target: :map2", + target: "map2", lat: 40.943926, lng: -78.968525, zoom: 9 diff --git a/plugins/subtitle/popcorn.subtitle.unit.js b/plugins/subtitle/popcorn.subtitle.unit.js index 82a8b290..aa0c6792 100755 --- a/plugins/subtitle/popcorn.subtitle.unit.js +++ b/plugins/subtitle/popcorn.subtitle.unit.js @@ -25,17 +25,17 @@ test( "Popcorn Subtitle Plugin", function() { popped.subtitle({ start: 0, end: 2, - text: "this is the first subtitle of 2011", + text: "this is the first subtitle of 2011" }) .subtitle({ start: 2, end: 4, - text: "this is the second subtitle of 2011", + text: "this is the second subtitle of 2011" }) .subtitle({ start: 5, end: 7, - text: "this is the third subtitle of 2011", + text: "this is the third subtitle of 2011" } ) .volume( 0 ) .play(); diff --git a/plugins/timeline/popcorn.timeline.unit.js b/plugins/timeline/popcorn.timeline.unit.js index ec054680..176c30aa 100644 --- a/plugins/timeline/popcorn.timeline.unit.js +++ b/plugins/timeline/popcorn.timeline.unit.js @@ -2,7 +2,8 @@ test( "Popcorn Timeline Plugin", function() { var popped = Popcorn( "#video" ), expects = 17, - upIds = downIds = [], + upIds = [], + downIds = [], count = 0, timelineUp = document.getElementById( "timeline-up" ), timelineDown = document.getElementById( "timeline-down" ); @@ -108,10 +109,10 @@ test( "Popcorn Timeline Plugin", function() { plus(); var uid, did; - while ( uid = upIds.pop() ) { + while ( uid === upIds.pop() ) { popped.removeTrackEvent( uid ); } - while ( did = downIds.pop() ) { + while ( did === downIds.pop() ) { popped.removeTrackEvent( did ); } diff --git a/plugins/twitter/popcorn.twitter.unit.js b/plugins/twitter/popcorn.twitter.unit.js index 90d27f22..2feda17f 100755 --- a/plugins/twitter/popcorn.twitter.unit.js +++ b/plugins/twitter/popcorn.twitter.unit.js @@ -27,14 +27,14 @@ test( "Popcorn Twitter Plugin", function() { ok( TWTR, "Twitter constructor exists" ); plus(); - } catch ( e ) {}; + } catch ( e ) {} popped.twitter({ start: 1, end: 2, title: "Steve Song", src: "@stevesong", - target: "twitterdiv", + target: "twitterdiv" }); setupId = popped.getLastTrackEventId(); diff --git a/plugins/wikipedia/popcorn.wikipedia.unit.js b/plugins/wikipedia/popcorn.wikipedia.unit.js index 62e50105..6fa4e80c 100755 --- a/plugins/wikipedia/popcorn.wikipedia.unit.js +++ b/plugins/wikipedia/popcorn.wikipedia.unit.js @@ -49,7 +49,7 @@ test( "Popcorn wikipedia Plugin", function() { notEqual( theArticle.children[ 1 ].innerHTML, "", "wikidiv has some content" ); plus(); // subtract 1 from length for the '...' added in by the plugin - equals( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" ) + equals( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" ); plus(); });