fix:fixed parseTime bug in ie and safari

776f10e197
This commit is contained in:
潘嘉晨
2020-06-04 21:19:22 +08:00
parent 4502d3ebc7
commit 97290e6f49
2 changed files with 13 additions and 2 deletions

View File

@@ -5,6 +5,9 @@ describe('Utils:parseTime', () => {
it('timestamp', () => {
expect(parseTime(d)).toBe('2018-07-13 17:54:01')
})
it('timestamp string', () => {
expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01')
})
it('ten digits timestamp', () => {
expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01')
})