"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _uuid = require("uuid");

var _camelizeHelpers = _interopRequireDefault(require("../camelizeHelpers"));

describe('camelizeHelpers', function () {
  describe('camelizedVals', function () {
    it('returns an array of values with camelized keys', function () {
      var exampleMap = {
        foo: {
          bar_baz: 'qux',
          woz_wiz: {
            groo_grux: 'hai'
          }
        },
        hello: {
          como_estas: 'bien'
        }
      };
      var listOfCamelizedValues = (0, _camelizeHelpers.default)(exampleMap);
      expect(listOfCamelizedValues[0].barBaz).to.be.equal('qux');
      expect(listOfCamelizedValues[0].wozWiz.grooGrux).to.be.equal('hai');
      expect(listOfCamelizedValues[1].comoEstas).to.be.equal('bien');
    });
    it('does not convert a uuid to camel case', function () {
      var exampleUUID = (0, _uuid.v4)();
      var mapWithUUIDs = {
        foo: (0, _defineProperty2.default)({}, exampleUUID, 'thisWorked'),
        bar: {
          baz_qux: 'val'
        }
      };
      var listOfCamelizedValues = (0, _camelizeHelpers.default)(mapWithUUIDs);
      expect(listOfCamelizedValues[0][exampleUUID]).to.be.equal('thisWorked');
    });
  });
});