<commit_before>assert      = require 'assert'
utils       = require '../lib/utils'

describe 'Utils', ->

  describe '#file2Module', ->
    it "filename return filename", (done) ->
      assert.equal 'filename', utils.file2Module('filename')
      done()

    it "file-name return fileName", (done) -><commit_msg>Add test case for uitls.intval<commit_after>assert      = require 'assert'
utils       = require '../lib/utils'

describe 'Utils', ->

  describe '#intval', ->
    it "noraml", (done) ->
      assert.equal 2, utils.intval(2)
      done()

    it "string 2", (done) ->
      assert.equal 2, utils.intval('2')
      done()

    it "string 2aa", (done) ->
      assert.equal 2, utils.intval('2aa')
      done()

    it "8 mode 10", (done) ->
      assert.equal 8, utils.intval('10', 8)
      done()

    it "string aaa, result is number 0", (done) ->
      assert.equal 0, utils.intval('aaa')
      done()

  describe '#file2Module', ->
    it "filename return filename", (done) ->
      assert.equal 'filename', utils.file2Module('filename')
      done()

    it "file-name return fileName", (done) ->
{'fraction_non_alphanumeric': 0.1681654676258993, 'fraction_numerical': 0.018884892086330936, 'mean_word_length': 2.5445859872611467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3052369', 'n_tokens_mistral': 371, 'n_tokens_neox': 355, 'n_words': 99}