<commit_before>var fs = require('fs');
var sys = require('util');

var assert = require('assert');

var tf2status_function = fs.readFileSync(__dirname + '/../src/tf2stats.js', 'utf8');

eval(tf2status_function);

var tf2status_xml = fs.readFileSync(__dirname + '/../fixtures/gutomaia-tf2.xml');

var statsClient = new StatsClient();

var stats = statsClient.getStats('gutomaia', 'tf2', tf2status_xml);

assert.equal(3, stats.visibilityState);
assert.equal("TF2", stats.gameFriendlyName);
assert.equal("Team Fortress 2", stats.gameName);
assert.equal("http://store.steampowered.com/app/440", stats.gameLink);
assert.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/e3f595a92552da3d664ad00277fad2107345f743.jpg", stats.gameIcon);
assert.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/07385eb55b5ba974aebbe74d3c99626bda7920b8.jpg", stats.logo);
assert.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/07385eb55b5ba974aebbe74d3c99626bda7920b8_thumb.jpg", stats.logoSmall);
assert.equal(76561197985077150,stats.steamID64);
assert.equal("gutomaia",stats.playerCustomURL);<commit_msg>refactored tf2stats_test to follow nodeunit standard<commit_after>var fs = require('fs');
var sys = require('util');

var assert = require('assert');

var tf2status_function = fs.readFileSync(__dirname + '/../src/tf2stats.js', 'utf8');

eval(tf2status_function);

var tf2status_xml = fs.readFileSync(__dirname + '/../fixtures/gutomaia-tf2.xml');

var statsClient = new StatsClient();

var stats = statsClient.getStats('gutomaia', 'tf2', tf2status_xml);

exports.testVisibilityState = function(test){
    test.equal(3, stats.visibilityState);
    test.done();
}

exports.testGameFriendlyName = function(test){
    test.equal("TF2", stats.gameFriendlyName);
    test.done();
}

exports.testGameName = function(test){
    test.equal("Team Fortress 2", stats.gameName);
    test.done();
}

exports.testGameLink = function(test){
    test.equal("http://store.steampowered.com/app/440", stats.gameLink);
    test.done();
}

exports.testGameIcon = function(test){
    test.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/e3f595a92552da3d664ad00277fad2107345f743.jpg", stats.gameIcon);
    test.done();
}

exports.testGameLogo = function(test){
    test.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/07385eb55b5ba974aebbe74d3c99626bda7920b8.jpg", stats.logo);
    test.done();
}

exports.testGameLogoSmall = function(test){
    test.equal("http://media.steampowered.com/steamcommunity/public/images/apps/440/07385eb55b5ba974aebbe74d3c99626bda7920b8_thumb.jpg", stats.logoSmall);
    test.done();
}

exports.testSteamID64 = function(test){
    test.equal(76561197985077150,stats.steamID64);
    test.done();
}

exports.testPlayerCustomURL = function(test){
    test.equal("gutomaia",stats.playerCustomURL);
    test.done();
}
{'fraction_non_alphanumeric': 0.15500170706725844, 'fraction_numerical': 0.08159781495390918, 'mean_word_length': 6.026378896882494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '1319616', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1050, 'n_words': 123}