fix: throws on invalid arguments for prepend/append, fixes #208

This commit is contained in:
harttle
2020-03-24 23:57:26 +08:00
parent 60c14ba057
commit 479c63350a
13 changed files with 163 additions and 113 deletions
+9
View File
@@ -7,6 +7,15 @@ const expect = chai.expect
chai.use(sinonChai)
describe('util/underscore', function () {
describe('.camel2snake()', function () {
it('should convert camelCase to snakeCase', function () {
expect(_.snakeCase('fooBarCoo')).to.equal('foo_bar_coo')
})
it('should convert empty string to empty string', function () {
expect(_.snakeCase('')).to.equal('')
})
})
describe('.isString()', function () {
it('should return true for literal string', function () {
expect(_.isString('foo')).to.be.true