<commit_before>
/**
 * Test dependencies.
 */

var util = require('../lib/util')

/**
 * Tests.
 */

describe('util', function () {

  describe('parse uri', function () {
    var http = util.parseUri('http://google.com')
      , https = util.parseUri('https://www.google.com:80')
      , query = util.parseUri('google.com:8080/foo/bar?foo=bar');

    http.protocol.should().eql('http');
    http.port.should().eql('');
    http.host.should().eql('google.com');
    https.protocol.should().eql('https');
    https.port.should().eql('80');
    https.host.should().eql('www.google.com');
    query.port.should().eql('8080');
    query.query.should().eql('foo=bar');
    query.path.should().eql('/foo/bar');
    query.relative.should().eql('/foo/bar?foo=bar');
  });

});<commit_msg>Fixed util tests.<commit_after>
/**
 * Test dependencies.
 */

var util = eio.util

/**
 * Tests.
 */

describe('util', function () {

  it('should parse an uri', function () {
    var http = util.parseUri('http://google.com')
      , https = util.parseUri('https://www.google.com:80')
      , query = util.parseUri('google.com:8080/foo/bar?foo=bar')

    expect(http.protocol).to.be('http');
    expect(http.port).to.be('');
    expect(http.host).to.be('google.com');
    expect(https.protocol).to.be('https');
    expect(https.port).to.be('80');
    expect(https.host).to.be('www.google.com');
    expect(query.port).to.be('8080');
    expect(query.query).to.be('foo=bar');
    expect(query.path).to.be('/foo/bar');
    expect(query.relative).to.be('/foo/bar?foo=bar');
  });

});
{'fraction_non_alphanumeric': 0.2427930813581038, 'fraction_numerical': 0.015374759769378604, 'mean_word_length': 3.4, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3893537', 'n_tokens_mistral': 570, 'n_tokens_neox': 547, 'n_words': 62}