refactor(shopping): redundanten kg-Check in consolidate() entfernt + Boundary-Test
Some checks failed
Build & Publish Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build & Publish Docker Image / build-and-push (push) Has been cancelled
Weight-Branch prueft nicht mehr doppelt auf unitFamily; stil-parity mit Volume-Branch. Boundary-Test fuer exakt 1000 g ergaenzt (15/15 Tests gruen). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,13 @@ describe('consolidate', () => {
|
||||
expect(out).toEqual({ quantity: 500, unit: 'g' });
|
||||
});
|
||||
|
||||
it('promoted bei exakt 1000 g (Boundary)', () => {
|
||||
const out = consolidate([
|
||||
{ quantity: 1000, unit: 'g' }
|
||||
]);
|
||||
expect(out).toEqual({ quantity: 1, unit: 'kg' });
|
||||
});
|
||||
|
||||
it('kombiniert ml + l analog (400 ml + 0,5 l → 900 ml)', () => {
|
||||
const out = consolidate([
|
||||
{ quantity: 400, unit: 'ml' },
|
||||
|
||||
Reference in New Issue
Block a user