<commit_before>'use strict';

const assert = require('assert');
const processNested = require('../lib').processNested;

describe('Test Convert Flatten object to Nested object', function() {
  it('With no nested data', function(){
    const data = {
        'firstname': 'John',
        'lastname': 'Doe',
        'age': 22
      },
      excerpt= { firstname: 'John', lastname: 'Doe', age: 22 },
      processed = processNested(data);

    assert.deepEqual(processed, excerpt);
  });

  it('With nested data', function(){
    const data = {
        'firstname': 'John',
        'lastname': 'Doe',
        'age': 22,
        'hobbies[0]': 'Cinema',
        'hobbies[1]': 'Bike',
        'address[line]': '78  Lynch Street',
        'address[city]': 'Milwaukee',
        'friends[0][name]': 'Jane',
        'friends[0][lastname]': 'Doe',<commit_msg>fix:Use processNested from js file<commit_after>'use strict';

const assert = require('assert');
const processNested = require('../lib/processNested');

describe('Test Convert Flatten object to Nested object', function() {
  it('With no nested data', () => {
    const data = {
        'firstname': 'John',
        'lastname': 'Doe',
        'age': 22
      },
      excerpt = { firstname: 'John', lastname: 'Doe', age: 22 },
      processed = processNested(data);

    assert.deepEqual(processed, excerpt);
  });

  it('With nested data', () => {
    const data = {
        'firstname': 'John',
        'lastname': 'Doe',
        'age': 22,
        'hobbies[0]': 'Cinema',
        'hobbies[1]': 'Bike',
        'address[line]': '78  Lynch Street',
        'address[city]': 'Milwaukee',
        'friends[0][name]': 'Jane',
        'friends[0][lastname]': 'Doe',
{'fraction_non_alphanumeric': 0.186768149882904, 'fraction_numerical': 0.01405152224824356, 'mean_word_length': 2.814732142857143, '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': '894354', 'n_tokens_mistral': 589, 'n_tokens_neox': 550, 'n_words': 133}