This commit is contained in:
2026-08-28 17:31:02 +02:00
commit 2b30e8bd39
694 changed files with 49243 additions and 0 deletions
@@ -0,0 +1,11 @@
import dayjs from '../plugins/dayjs';
import { formatRelativeTimeAgo } from './formatRelativeTimeAgo';
describe('formatRelativeTimeAgo', () => {
it('formats a relative time from the provided now date', () => {
const now = new Date('2026-01-02T12:00:00.000Z');
const earlier = new Date('2026-01-02T11:00:00.000Z');
expect(formatRelativeTimeAgo(earlier, now)).toBe(dayjs(earlier).from(dayjs(now)));
});
});