<commit_before>//this is a test file that is using Qunit testing framework

QUnit.test("API key test", function(assert){
    assert.equal(API_KEY, "8056edf51377902d28bd9e53a5dd97af", "API key is correct");
});

QUnit.test("API with wrong key", function(assert){
    assert.notEqual(API_KEY, "8056edf51502d28bd9e53a5dd97af", "API key noted as wrong. Success!!!");
});

QUnit.test("Watch height and width", function(assert){
    assert.expect(2);
    assert.equal(WATCH_WIDTH, "200", "Width is correct");
    assert.equal(WATCH_HEIGHT, "200", "height is correct");
});



QUnit.test("making sure that the strings aren't empty", function(assert){
   assert.expect(9);
   assert.notEqual(weatherType,"", "string is not equal to empty");
   assert.notEqual(weatherTitle,"", "string is not equal to empty");
   assert.notEqual(notForecastMessage,"", "string is not equal to empty");
   assert.notEqual(colour,"", "string is not equal to empty");
   assert.notEqual(time,"", "string is not equal to empty");
   assert.notEqual(labels,"", "string is not equal to empty");
   assert.notEqual(imagePath,"", "string is not equal to empty");
   assert.notEqual(iconImagePath,"", "string is not equal to empty");
   assert.notEqual(API_URL,"", "string is not equal to empty");
});


QUnit.test("Testing the city", function(assert){
    assert.expect(1);
    var latitude = -43.532054;
    var longitude = 172.636225;
    var cityName;
    
    var done = assert.async();
    
    jQuery.getJSON(String.format(API_URL, latitude, longitude, API_KEY), function (jsonObj) {
        var cityName = jsonObj.city.name;
        assert.equal("Christchurch", cityName, "city is equal to 'Christchurch'");
        done();
    });
     
});
<commit_msg>Finished our testing<commit_after>//this is a test file that is using Qunit testing framework

QUnit.test("API key test", function(assert){
    assert.equal(API_KEY, "8056edf51377902d28bd9e53a5dd97af", "API key is correct");
});

QUnit.test("API with wrong key", function(assert){
    assert.notEqual(API_KEY, "8056edf51502d28bd9e53a5dd97af", "API key noted as wrong. Success!!!");
});

QUnit.test("Watch height and width", function(assert){
    assert.expect(2);
    assert.equal(WATCH_WIDTH, "200", "Width is correct");
    assert.equal(WATCH_HEIGHT, "200", "height is correct");
});



QUnit.test("making sure that the strings aren't empty", function(assert){
   assert.expect(9);
   assert.notEqual(weatherType,"", "string is not equal to empty");
   assert.notEqual(weatherTitle,"", "string is not equal to empty");
   assert.notEqual(notForecastMessage,"", "string is not equal to empty");
   assert.notEqual(colour,"", "string is not equal to empty");
   assert.notEqual(time,"", "string is not equal to empty");
   assert.notEqual(labels,"", "string is not equal to empty");
   assert.notEqual(imagePath,"", "string is not equal to empty");
   assert.notEqual(iconImagePath,"", "string is not equal to empty");
   assert.notEqual(API_URL,"", "string is not equal to empty");
});


QUnit.test("Testing the API Pulls the correct city", function(assert){
    assert.expect(1);
    var latitude = -43.532054;
    var longitude = 172.636225;
    var cityName;
    
    var done = assert.async();
    
    jQuery.getJSON(String.format(API_URL, latitude, longitude, API_KEY), function (jsonObj) {
        var cityName = jsonObj.city.name;
        assert.equal("Christchurch", cityName, "city is equal to 'Christchurch'");
        done();
    });
     
});

QUnit.test("make sure the canvas is not empty", function(assert){
    assert.notEqual(canvas, "", "Canvas is not empty")
})

QUnit.test("Make sure images are pushed onto array", function(assert){
    assert.equal(backgroundImages.length, 5, "Images are correctly pushed");
})

QUnit.test("testing calcDifferece function", function(assert){
    assert.equal(calcTimeDifference(new Date()), "0 Hours", "calcTimeDifference function works correctly");
})
{'fraction_non_alphanumeric': 0.1448170731707317, 'fraction_numerical': 0.032520325203252036, 'mean_word_length': 4.460471567267684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6379918', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1210, 'n_words': 355}