import { describe, expect, it } from '@rstest/core'; import { formatShoppingPlanSummary } from '../src/shared/shopping-plan-summary'; describe('formatShoppingPlanSummary', () => { it('formats the people count, item count and subtotal', () => { expect( formatShoppingPlanSummary({ people_count: 2, item_count: 6, subtotal: 90 }) ).toBe('2 人 · 共 6 件 · 预计 ¥90'); }); it('uses zero for missing values', () => { expect(formatShoppingPlanSummary({})).toBe('0 人 · 共 0 件 · 预计 ¥0'); }); });