mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:35:21 +00:00
Align the campaign desk with quieter KPI strips, queues-first dashboard, shared shells, and advanced filters; capture Impeccable design context and the remaining simplify/critique debts on the roadmap.
18 lines
637 B
TypeScript
18 lines
637 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { formatRelativeAge } from '@/utilities/formatRelativeAge'
|
|
|
|
const now = Date.parse('2026-07-19T12:00:00.000Z')
|
|
|
|
describe('formatRelativeAge', () => {
|
|
it('formats minutes and hours with numeric cues', () => {
|
|
expect(formatRelativeAge(now - 5 * 60_000, now)).toContain('5')
|
|
expect(formatRelativeAge(now - 3 * 60 * 60_000, now)).toContain('3')
|
|
})
|
|
|
|
it('formats multi-day spans via Intl auto rules', () => {
|
|
expect(formatRelativeAge(now - 2 * 24 * 60 * 60_000, now)).toBe(
|
|
new Intl.RelativeTimeFormat('pt-BR', { numeric: 'auto' }).format(-2, 'day'),
|
|
)
|
|
})
|
|
})
|