【再掲】タグの局所記載 (#351) (#380)

#353 を再開できなかったので.

Reviewed-on: #380
Co-authored-by: miteruzo <miteruzo@naver.com>
Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #380 でマージされました.
このコミットが含まれているのは:
2026-07-03 03:23:36 +09:00
committed by みてるぞ
コミット fdf652951a
32個のファイルの変更920行の追加63行の削除
+12 -1
ファイルの表示
@@ -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')
})
})