import { readFileSync } from 'node:fs'; import { describe, expect, it } from 'vitest'; import { CURRENT_ASSESSOR_PROCESSING_VERSION } from '../../src/domain/processing-compatibility'; const app = readFileSync(new URL('../../src/app/App.tsx', import.meta.url), 'utf8'); const layout = readFileSync(new URL('../../src/styles/layout.css', import.meta.url), 'utf8'); describe('ASSESSOR version in the brand header', () => { it('shows only the centrally maintained processing version below the brand name', () => { expect(CURRENT_ASSESSOR_PROCESSING_VERSION).toBe('1.3.0'); expect(app).toContain("import { CURRENT_ASSESSOR_PROCESSING_VERSION } from '../domain/processing-compatibility';"); expect(app).toContain('

ASSESSOR

{CURRENT_ASSESSOR_PROCESSING_VERSION}
'); expect(app).not.toContain('>Version {CURRENT_ASSESSOR_PROCESSING_VERSION}'); expect(app).not.toContain('>v{CURRENT_ASSESSOR_PROCESSING_VERSION}'); expect(layout).toMatch(/\.brand-copy\s*\{[^}]*display:\s*grid;[^}]*gap:\s*var\(--space-1\);/s); expect(layout).toMatch(/\.brand-version\s*\{[^}]*font-size:\s*var\(--fs-micro\);[^}]*font-variant-numeric:\s*tabular-nums;/s); }); });