<commit_before>test("Popcorn Image Plugin", function () {
  
  var popped = Popcorn("#video"),
      expects = 5,
      count = 0,
      interval,
      interval2,
      imagediv = document.getElementById('imagediv');
  
  expect( expects );
  
  function plus() {
    if ( ++count === expects) {
      start();
    }
  }

  stop();
 
  ok('image' in popped, "image is a method of the popped instance");
  plus();

  equals ( imagediv.innerHTML, "", "initially, there is nothing inside the imagediv" );
  plus();
  
  popped.image({
    start: 1, // seconds
    end: 3, // seconds
    href: 'http://www.drumbeat.org/',
    src: 'https://www.drumbeat.org/media//images/drumbeat-logo-splash.png',
    text: 'DRUMBEAT',
    target: 'imagediv'
  } );

  popped.exec( 2, function() {
    if( popped.currentTime() > 1 && popped.currentTime() < 3 ) {
      ok( /display: block;/.test( imagediv.innerHTML ), "Div contents are displayed" );
      plus();
      ok( /img/.test( imagediv.innerHTML ), "An image exists" );
      plus();
    }
  });
  
  popped.exec( 4, function() {
    if( popped.currentTime() > 3 ) {
      ok( /display: none;/.test( imagediv.innerHTML ), "Div contents are hidden again" );
      plus();
    }
  });
  
  popped.volume(0);
  popped.play();  
});<commit_msg>updated unit test of image -#368<commit_after>test("Popcorn Image Plugin", function () {
  
  var popped = Popcorn("#video"),
      expects = 5,
      count = 0,
      imagediv = document.getElementById('imagediv');
  
  expect( expects );
  
  function plus() {
    if ( ++count === expects) {
      start();
    }
  }

  stop();
 
  ok('image' in popped, "image is a method of the popped instance");
  plus();

  equals ( imagediv.innerHTML, "", "initially, there is nothing inside the imagediv" );
  plus();
  
  popped.image({
    start: 1, // seconds
    end: 3, // seconds
    href: 'http://www.drumbeat.org/',
    src: 'https://www.drumbeat.org/media//images/drumbeat-logo-splash.png',
    text: 'DRUMBEAT',
    target: 'imagediv'
  });

  popped.exec( 2, function() {
      ok( /display: block;/.test( imagediv.innerHTML ), "Div contents are displayed" );
      plus();
      ok( /img/.test( imagediv.innerHTML ), "An image exists" );
      plus();
  });
  
  popped.exec( 4, function() {
      ok( /display: none;/.test( imagediv.innerHTML ), "Div contents are hidden again" );
      plus();
  });
  popped.volume(0).play();  
  
});
{'fraction_non_alphanumeric': 0.17540239372678498, 'fraction_numerical': 0.008666941807676434, 'mean_word_length': 2.5647058823529414, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6183375', 'n_tokens_mistral': 833, 'n_tokens_neox': 800, 'n_words': 200}