Adds the shoot-type pages content and SEO foundation
Five pages under /soorten-fotoshoots/<id> with draft copy awaiting Andrea's approval (DRAFT markers), structured data (Service, BreadcrumbList, FAQPage), sitemap and Lighthouse entries. The overview route moves to soorten-fotoshoots/index.tsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import fc from 'fast-check';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { richText } from '../test/arbitraries';
|
||||
import { richTextToPlain } from './richTextToPlain';
|
||||
|
||||
describe('richTextToPlain', () => {
|
||||
it('reads links by their text, without adding spaces', () => {
|
||||
expect(
|
||||
richTextToPlain([
|
||||
'Staat je vraag er niet tussen? ',
|
||||
{ text: 'Stuur gerust een berichtje', to: '/contact' },
|
||||
'.',
|
||||
]),
|
||||
).toBe('Staat je vraag er niet tussen? Stuur gerust een berichtje.');
|
||||
expect(richTextToPlain([])).toBe('');
|
||||
expect(richTextToPlain(['Alleen tekst'])).toBe('Alleen tekst');
|
||||
});
|
||||
|
||||
it('is the text pieces and link texts joined, as long as they are together (invariant)', () => {
|
||||
fc.assert(
|
||||
fc.property(richText, (text) => {
|
||||
const pieces = text.map((piece) =>
|
||||
typeof piece === 'string' ? piece : piece.text,
|
||||
);
|
||||
const plain = richTextToPlain(text);
|
||||
expect(plain).toBe(pieces.join(''));
|
||||
expect(plain.length).toBe(
|
||||
pieces.reduce((sum, piece) => sum + piece.length, 0),
|
||||
);
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user