<commit_before>describe('util', function () {
  var Base = require('../../../lib/base')
  var util = require('../../../lib/util')

  describe('isNumber', function () {
    it('should check if parameter is a number and return a boolean value', function () {
      // must pass
      expect(util.isNumber(2)).to.be.ok
      expect(util.isNumber(-10)).to.be.ok

      // must fail
      expect(util.isNumber('2')).to.not.be.ok
      expect(util.isNumber('two')).to.not.be.ok
    })
  })

  describe('isNumberLike', function () {
    it('should check if parameter is like a number ("2", "-10") and return a boolean value', function () {
      // must pass
      expect(util.isNumberLike(2)).to.be.ok
      expect(util.isNumberLike(-10)).to.be.ok
      expect(util.isNumberLike('2')).to.be.ok

      // must fail
      expect(util.isNumberLike('two')).to.not.be.ok
    })
  })

  describe('isPlainObj', function () {
    it('should check if parameter is a plain object and return a boolean value', function () {
      // must pass
      expect(util.isPlainObj({})).to.be.true
      expect(util.isPlainObj({x: 1})).to.be.true
      expect(util.isPlainObj([])).to.be.true

      // mast fail
      expect(util.isPlainObj('two')).to.not.be.true
    })
  })

  describe('convertToArray', function () {
    it('should convert an object into an array', function () {
      var testFunc = function () {
        return arguments
      }

      // must pass
      expect(
        Array.isArray(
          util.convertToArray(testFunc(1, 2, 3, 4))
        )
      ).to.be.true

      // must fail
      expect(
        Array.isArray(<commit_msg>cleaned up utils test<commit_after>describe('util', function () {
  var Base = require('../../../lib/base')
  var util = require('../../../lib/util')

  describe('isNumber', function () {
    it('should check if parameter is a number and return a boolean value', function () {
      expect(util.isNumber(2)).to.be.ok
      expect(util.isNumber(-10)).to.be.ok
      expect(util.isNumber('2')).to.not.be.ok
      expect(util.isNumber('two')).to.not.be.ok
    })
  })

  describe('isNumberLike', function () {
    it('should check if parameter is like a number ("2", "-10") and return a boolean value', function () {
      // must pass
      expect(util.isNumberLike(2)).to.be.ok
      expect(util.isNumberLike(-10)).to.be.ok
      expect(util.isNumberLike('2')).to.be.ok

      // must fail
      expect(util.isNumberLike('two')).to.not.be.ok
    })
  })

  describe('isPlainObj', function () {
    it('should check if parameter is a plain object and return a boolean value', function () {
      // must pass
      expect(util.isPlainObj({})).to.be.true
      expect(util.isPlainObj({x: 1})).to.be.true
      expect(util.isPlainObj([])).to.be.true

      // mast fail
      expect(util.isPlainObj('two')).to.not.be.true
    })
  })

  describe('convertToArray', function () {
    it('should convert an object into an array', function () {
      var testFunc = function () {
        return arguments
      }
      expect(
        Array.isArray(
          util.convertToArray(testFunc(1, 2, 3, 4))
        )
      ).to.be.true
      expect(
        Array.isArray(
{'fraction_non_alphanumeric': 0.16995923486986517, 'fraction_numerical': 0.010034493571652555, 'mean_word_length': 2.390010626992561, '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': '2854529', 'n_tokens_mistral': 1028, 'n_tokens_neox': 1012, 'n_words': 214}