<commit_before>// TODO:
//
// - See if there is a setup feature so the version number only has 
//   to be changed in one place. 


QUnit.test("Make sure the version number is accurate", function(assert) {

  // Given
  var required_version_number = "0.5.0";

  // When 
  var imageLoader = new ImageLoader_0_5_x(); 

  // Then
  assert.equal(imageLoader.version_number(), required_version_number); 

});


QUnit.test("Integration Test: Basic call verification", function(assert) {

    var target_string = '<img alt="image description" width="640" height="436" src="http://res.cloudinary.com/demo/image/upload/w_1280,h_852,q_80/horses.jpg">';

    // Given
    var imageLoader = new ImageLoader_0_5_x(); 

    // TODO: Add environmental param override to standardize output.

    // Then
    assert.equal(imageLoader.image_string_from_params( { } ), target_string);


});



QUnit.test("Integration Test: Verify environmental parameters load", function(assert) {

    // It's a little weird to tests these params, but I 
    // want to make sure they work for integration purposes. 

    // Given
    var target_dpr = window.devicePixelRatio ? window.devicePixelRatio : 1;

    // When
    var imageLoader = new ImageLoader_0_5_x(); 
    imageLoader.load_environmental_params();

    // Then
    assert.equal(imageLoader._dpr, target_dpr);

});
<commit_msg>Prepped for better call to the primary integration test.<commit_after>// TODO:
//
// - See if there is a setup feature so the version number only has 
//   to be changed in one place. 


QUnit.test("Make sure the version number is accurate", function(assert) {

  // Given
  var required_version_number = "0.5.0";

  // When 
  var imageLoader = new ImageLoader_0_5_x(); 

  // Then
  assert.equal(imageLoader.version_number(), required_version_number); 

});


QUnit.test("Integration Test: Basic call verification", function(assert) {

    // Preflight
    var target_string = '<img alt="image description" width="640" height="436" src="http://res.cloudinary.com/demo/image/upload/w_1280,h_852,q_80/horses.jpg">';

    // Given
    var imageLoader = new ImageLoader_0_5_x(); 
    
    // When 
    var image_params = {
        filename: "horses.jpg", 
        alt_text: "Photo of Horses",
        source_width: 1600,
        source_height: 1067
    };

    var result_string = imageLoader.image_string_from_params(image_params);

    // TODO: Add environmental param override to standardize output independent of browser.

    // Then
    assert.equal(result_string, target_string);


});



QUnit.test("Integration Test: Verify environmental parameters load", function(assert) {

    // It's a little weird to tests these params, but I 
    // want to make sure they work for integration purposes. 

    // Given
    var target_dpr = window.devicePixelRatio ? window.devicePixelRatio : 1;

    // When
    var imageLoader = new ImageLoader_0_5_x(); 
    imageLoader.load_environmental_params();

    // Then
    assert.equal(imageLoader._dpr, target_dpr);

});

{'fraction_non_alphanumeric': 0.11217736598279285, 'fraction_numerical': 0.019192587690271344, 'mean_word_length': 3.2457865168539324, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '522596', 'n_tokens_mistral': 972, 'n_tokens_neox': 888, 'n_words': 252}