aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/dupre-revised.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 07:45:18 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 07:45:18 -0500
commit092a2312a1d2fa1364b1d5cb9c2d71a8aefaeb8e (patch)
treee2d1f2a58e4b5af1cfe2c6fec8379b61ac80bb6a /scripts/theme-studio/dupre-revised.json
parentec3d767435390cebedee8e3ca504d4b20d52f735 (diff)
downloaddotemacs-092a2312a1d2fa1364b1d5cb9c2d71a8aefaeb8e.tar.gz
dotemacs-092a2312a1d2fa1364b1d5cb9c2d71a8aefaeb8e.zip
test(theme-studio): extract color/slug helpers to importable modules and cover them
The pure helpers that were still stranded in app.js — normHex, ratingColor, textOn, and the filename-slug logic — had no unit tests because app.js can't be imported (it runs its bootstrap and references the data placeholders at load). Moved them into importable modules so they can be tested directly: a new app-util.js holds the color/UI-boundary trio, and slugify joins app-core.js. app.js keeps thin wrappers, so no call site changed and the built DOM is byte-identical. textOn needs rl from colormath, so generate.py's inline strip now drops import lines as well as export lines — app-util.js imports rl for its tests, and the import is stripped on inline where rl is already in the page. _faces in generate.py also gets direct tests for its prefix-strip and label derivation. New: 12 node tests (normHex, ratingColor, textOn, slugify) and 7 python tests (_faces, app-util integrity, the import strip). Coverage: app-util.js 100/100/100, app-core.js 100/94.9/100, colormath.js 100/96/100 (line/branch/func); generate.py 89% lines (the rest is the __main__ writer and the optional seed-env branch). No bugs surfaced — the logic was correct, just untested.
Diffstat (limited to 'scripts/theme-studio/dupre-revised.json')
0 files changed, 0 insertions, 0 deletions