<commit_before>'use strict'
const test = require('tape')

const camelCaseKeys = require('../../lib/utils/camel-case-keys')

test('camelizes all dasherized keys', (t) => {
  const data = {
    id: '45',
    name: 'Admin',
    'user-group': '1',
    'user-rights': '3'
  }

  const normalized = camelCaseKeys(data)

  t.equal(normalized.id, '45')
  t.equal(normalized.name, 'Admin')
  t.equal(normalized.userGroup, '1')
  t.equal(normalized.userRights, '3')
  t.notok(normalized['user-group'])
  t.notok(normalized['user-rights'])
  t.end()
})<commit_msg>upgrade camelCaseKeys test<commit_after>'use strict'
const test = require('tape')

const camelCaseKeys = require('../../lib/utils/camel-case-keys')

test('camelizes all dasherized keys', (t) => {
  const data = {
    id: '45',
    name: 'Admin',
    'user-group': '1',
    'user-rights': '3'
  }

  const normalized = camelCaseKeys(data)

  t.equal(normalized.id, '45')
  t.equal(normalized.name, 'Admin')
  t.equal(normalized.userGroup, '1')
  t.equal(normalized.userRights, '3')
  t.notok(normalized['user-group'])
  t.notok(normalized['user-rights'])

  t.deepEqual(data, {
    id: '45',
    name: 'Admin',
    userGroup: '1',
    userRights: '3'
  })

  t.end()
})
{'fraction_non_alphanumeric': 0.19737919737919737, 'fraction_numerical': 0.01638001638001638, 'mean_word_length': 3.754863813229572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2630736', 'n_tokens_mistral': 486, 'n_tokens_neox': 464, 'n_words': 85}