fix: date from integer, #125

This commit is contained in:
harttle
2019-05-12 21:03:35 +08:00
parent bef290923c
commit fdf0043b9c
6 changed files with 42 additions and 4 deletions
+8
View File
@@ -18,6 +18,14 @@ describe('util/underscore', function () {
expect(_.isString(123)).to.be.false
})
})
describe('.isNumber()', function () {
it('should return false for "foo"', function () {
expect(_.isNumber('foo')).to.be.false
})
it('should return true for 0', function () {
expect(_.isNumber(0)).to.be.true
})
})
describe('.stringify()', function () {
it('should respect to toLiquid() method', function () {
expect(_.stringify({ toLiquid: () => 'foo' })).to.equal('foo')