/** * AR-5 Drift-Guard: colorVarietySeed.generated.json muss mit dem Live-Output * aus catalog.ts übereinstimmen. * * Schlägt dieser Test fehl, wurde catalog.ts verändert ohne danach * `npm run gen:catalog` auszuführen. Fix: `npm run gen:catalog` laufen lassen * und die geänderten JSON-Dateien committen. */ import { readFileSync } from 'fs' import { fileURLToPath } from 'url' import { dirname, join } from 'path' import { describe, it, expect } from 'vitest' import { CATALOG } from '../catalog' const __dir = dirname(fileURLToPath(import.meta.url)) describe('AR-5 Catalog drift-guard', () => { it('colorVarietySeed.generated.json stimmt mit catalog.ts überein (sonst: npm run gen:catalog)', () => { const jsonPath = join(__dir, '..', 'colorVarietySeed.generated.json') const committed = JSON.parse(readFileSync(jsonPath, 'utf-8')) // CATALOG is readonly — deep equality against the plain parsed array is sufficient. expect(committed).toEqual(Array.from(CATALOG)) }) })