We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4320647 commit 828f811Copy full SHA for 828f811
tests/unit/utils/formatTime.spec.js
@@ -1,7 +1,7 @@
1
import { formatTime } from '@/utils/index.js'
2
3
describe('Utils:formatTime', () => {
4
- const d = new Date(1531475641067) // "2018-07-13 17:54:01"
+ const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
5
6
it('test now', () => {
7
expect(formatTime(+new Date() - 1)).toBe('刚刚')
tests/unit/utils/parseTime.spec.js
import { parseTime } from '@/utils/index.js'
describe('Utils:parseTime', () => {
it('timestamp', () => {
expect(parseTime(d)).toBe('2018-07-13 17:54:01')
})
0 commit comments