Flatten authenticated sidebar IA, move admin to the profile menu, right-align TopSearchBar actions, and replace placeholder dashboard panels with data from /api/user/stats and /api/user-cards. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
500 B
JavaScript
14 lines
500 B
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { formatRelativeTime } from '../../lib/format-relative-time.js';
|
|
|
|
describe('formatRelativeTime', () => {
|
|
it('returns empty string for missing input', () => {
|
|
expect(formatRelativeTime()).toBe('');
|
|
expect(formatRelativeTime('')).toBe('');
|
|
});
|
|
|
|
it('formats recent minutes', () => {
|
|
const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString();
|
|
expect(formatRelativeTime(fiveMinutesAgo)).toBe('5m ago');
|
|
});
|
|
});
|