<commit_before>vows = require 'vows'
assert = require 'assert'
helpers = require '../src/helpers'

vows
  .describe('Helpers')
  .addBatch
    'getHostname(http://google.com)':
      topic: -> 
        helpers.getHostname 'http://google.com'

      'returns "google.com"': (topic) ->
        assert.equal topic, 'google.com'

    'getHostname(http://blog.github.com)':
      topic: -> 
        helpers.getHostname 'http://blog.github.com'

      'returns "blog.github.com"': (topic) ->
        assert.equal topic, 'blog.github.com'
    

  .export(module)<commit_msg>Updated getHostname() test to accomodate new behavior.<commit_after>vows = require 'vows'
assert = require 'assert'
helpers = require '../src/helpers'

vows
  .describe('Helpers')
  .addBatch
    'getHostname(http://example.com)':
      topic: -> 
        helpers.getHostname 'http://example.com'

      'returns "example.com"': (topic) ->
        assert.equal topic, 'example.com'

    'getHostname(http://www.example.com)':
      topic: -> 
        helpers.getHostname 'http://www.example.com'

      'returns "example.com"': (topic) ->
        assert.equal topic, 'example.com'

    'getHostname(http://blog.example.com)':
      topic: -> 
        helpers.getHostname 'http://blog.example.com'

      'returns "blog.example.com"': (topic) ->
        assert.equal topic, 'blog.example.com'
    

  .export(module)
{'fraction_non_alphanumeric': 0.16859623733719248, 'fraction_numerical': 0.0, 'mean_word_length': 2.62992125984252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2610526', 'n_tokens_mistral': 463, 'n_tokens_neox': 455, 'n_words': 81}