import { describe, expect, it } from 'vitest'; import { normalizePrepUnit } from '../src/services/preparationAiService'; describe('normalizePrepUnit', () => { it('maps 散装/斤 to 斤', () => { expect(normalizePrepUnit('散装/斤')).toBe('斤'); expect(normalizePrepUnit('斤')).toBe('斤'); }); it('keeps 件 distinct from 斤', () => { expect(normalizePrepUnit('件')).toBe('件'); expect(normalizePrepUnit('散装/斤')).not.toBe(normalizePrepUnit('件')); }); });