fix(shopping): omit units for ingredients without quantities
This commit is contained in:
1 parent
8fa63415f1
commit
9ecd36db0f
3 files changed
+10
-2
No files matched your search
@@ -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' });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user