import fc from 'fast-check'; import { describe, expect, it } from 'vitest'; import { copyrightLine } from './copyrightLine'; describe('copyrightLine', () => { it('heeft de vaste vorm', () => { expect(copyrightLine(2026)).toBe('© 2026 Andrea Slop Fotografie'); }); it('het jaartal is er weer uit te halen (round-trip)', () => { fc.assert( fc.property(fc.integer({ min: 0, max: 9999 }), (year) => { const match = copyrightLine(year).match(/^© (\d+) /); return match !== null && Number(match[1]) === year; }), ); }); it('begint met © en eindigt met de bedrijfsnaam (invariant)', () => { fc.assert( fc.property(fc.integer(), (year) => { const line = copyrightLine(year); return ( line.startsWith('©') && line.endsWith('Andrea Slop Fotografie') ); }), ); }); });