Covers the featured flag of an offering in the mapping tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,17 @@ describe('mapOfferings', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('neemt featured over alleen als het true is', () => {
|
||||||
|
const result = mapOfferings([
|
||||||
|
card({ slug: 'a', featured: true }),
|
||||||
|
card({ slug: 'b', featured: 'ja' }),
|
||||||
|
]);
|
||||||
|
expect(result?.packages.map((p) => p.featured)).toEqual([
|
||||||
|
true,
|
||||||
|
undefined,
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
it('slaat ongeldige kaarten over en behoudt de rest', () => {
|
it('slaat ongeldige kaarten over en behoudt de rest', () => {
|
||||||
const result = mapOfferings([
|
const result = mapOfferings([
|
||||||
card({ slug: 'Slecht Id' }),
|
card({ slug: 'Slecht Id' }),
|
||||||
|
|||||||
Reference in New Issue
Block a user