{"size": 1030, "ext": "js", "max_stars_repo_path": "test/unit.spec.js", "max_stars_repo_name": "liuwill/simple-camelcase", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/unit.spec.js", "max_issues_repo_name": "liuwill/simple-camelcase", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/unit.spec.js", "max_forks_repo_name": "liuwill/simple-camelcase", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.4090909091, "max_line_length": 73, "alphanum_fraction": 0.6077669903}
'use strict'

var chai = require('chai')

chai.should()
var expect = chai.expect

var simpleCamelcase = require('../')

describe('#simple camelcase', function () {
  describe('# to upper camel', function () {
    it('return upper case', function () {
      var str = 'will'
      var result = 'Will'

      expect(result).to.be.equal(simpleCamelcase.toUpperCamel(str))
    })

    it('return blank string', function () {
      expect(simpleCamelcase.toUpperCamel('')).to.be.equal('')
    })

    it('throw error with none', function () {
      expect(function () { simpleCamelcase.toUpperCamel({}) }).to.throw()
    })
  })

  describe('# to lower camel', function () {
    it('will return upper camel', function () {
      var str = 'Will'
      var result = 'will'

      expect(result).to.be.equal(simpleCamelcase.toLowerCamel(str))
    })

    it('return lower camel', function () {
      var str = 'User__nAme'
      var result = 'userName'

      expect(simpleCamelcase.toLowerCamel(str)).to.be.equal(result)
    })
  })
})
