#353 を再開できなかったので. Reviewed-on: #380 Co-authored-by: miteruzo <miteruzo@naver.com> Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #380 でマージされました.
このコミットが含まれているのは:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { cn, originalCreatedAtString, toDate } from '@/lib/utils'
|
||||
import { cn, msToTime, originalCreatedAtString, toDate } from '@/lib/utils'
|
||||
|
||||
describe ('utils', () => {
|
||||
it ('converts strings to dates and leaves date instances intact', () => {
|
||||
@@ -26,3 +26,14 @@ describe ('utils', () => {
|
||||
).toContain ('時刻不詳')
|
||||
})
|
||||
})
|
||||
|
||||
describe ('msToTime', () => {
|
||||
it ('keeps milliseconds when present', () => {
|
||||
expect (msToTime (60_500)).toBe ('1:00.500')
|
||||
expect (msToTime (60_001)).toBe ('1:00.001')
|
||||
})
|
||||
|
||||
it ('omits milliseconds when they are zero', () => {
|
||||
expect (msToTime (60_000)).toBe ('1:00')
|
||||
})
|
||||
})
|
||||
|
||||
新しい課題から参照
ユーザをブロックする