Fix empty string conversion

This commit is contained in:
typicode
2015-01-08 13:44:03 +00:00
parent 357b70757a
commit e660f0bd6b
2 changed files with 6 additions and 4 deletions

View File

@ -32,14 +32,14 @@ describe('utils', function() {
describe('toNative', function() {
it('should convert string to native type', function() {
// should convert
assert.strictEqual(utils.toNative('1'), 1)
assert.strictEqual(utils.toNative('true'), true)
// should not convert
assert.strictEqual(utils.toNative(''), '')
assert.strictEqual(utils.toNative('string'), 'string')
assert.strictEqual(utils.toNative(1), 1)
assert.strictEqual(utils.toNative(true), true)
})
})