// scripts/brand/wordmark.py is the single source of the icon and the wordmark // geometry: it copies assets/logo.svg into public/ and generates // wordmark.gen.ts. Neither copy may be edited by hand. import test from 'node:test' import assert from 'node:assert/strict' import fs from 'node:fs' import path from 'node:path' const repoRoot = path.resolve(import.meta.dirname, '..', '..') test('frontend/public/logo.svg is the copy of assets/logo.svg', () => { const source = fs.readFileSync(path.join(repoRoot, 'assets', 'logo.svg')) const served = fs.readFileSync(path.join(repoRoot, 'frontend', 'public', 'logo.svg')) assert.ok(source.equals(served), 'run python scripts/brand/wordmark.py to refresh frontend/public/logo.svg') }) test('the frontend wordmark geometry is generated', () => { const generated = fs.readFileSync(path.join(repoRoot, 'frontend', 'src', 'components', 'wordmark.gen.ts'), 'utf8') assert.match(generated, /^\/\/ Code generated by scripts\/brand\/wordmark\.py; DO NOT EDIT\./) assert.match(generated, /export const WORDMARK_STROKES: WordmarkStroke\[\] = \[/) })