fix(shopping): omit units for ingredients without quantities

This commit is contained in:
OpenCode committed 2026-10-24 15:44:52 +02:00
1 parent 8fa63415f1
commit 9ecd36db0f
3 files changed
+10 -2

No files matched your search

+8
View File
@@ -93,4 +93,12 @@ describe('Precise scaling from immutable originals', () => {
);
expect(b).toHaveLength(3);
});
it('does not display an artificial unit for unquantified shopping ingredients', () => {
const list = mergeShopping(
[],
[{ ...chicken, name: 'Salz', amount: null, note: 'nach Geschmack' }],
'4',
);
expect(list[0]).toMatchObject({ amount: null, unit: '', note: 'nach Geschmack' });
});
});