fix(conversations): 优化列表时间显示

This commit is contained in:
Rogee
2026-08-06 11:31:14 +08:00
parent 8d002d1dbe
commit 3bceb2d0b2
2 changed files with 18 additions and 1 deletions
@@ -0,0 +1,15 @@
import { chineseShortTimestamp } from '../TimeAgo.vue';
describe('chineseShortTimestamp', () => {
it.each([
['now', '刚刚'],
['1m', '1分钟'],
['1h', '1小时'],
['12h', '12小时'],
['1d', '1天'],
['2mo', '2个月'],
['1y', '1年'],
])('formats %s as %s', (timestamp, expected) => {
expect(chineseShortTimestamp(timestamp)).toBe(expected);
});
});