aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/package-inventory.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 06:02:49 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 06:02:49 -0500
commitdd90eca92f8ffc60094c9e956c8730b94956eb33 (patch)
treea53c095e15fa561f47bcbb4fdb01fe2482e8d05b /scripts/theme-studio/package-inventory.json
parent1ba9c5aa77ea315b4dd87ae9aa149169e0948d95 (diff)
downloaddotemacs-dd90eca92f8ffc60094c9e956c8730b94956eb33.tar.gz
dotemacs-dd90eca92f8ffc60094c9e956c8730b94956eb33.zip
test(theme-studio): extract app-core.js and unit-test the app logic
The refactor's goal was to make the app logic testable; this realizes it. Pulled the pure package-face model and the dropdown option list into app-core.js — nameToHex, buildPkgmap, packagesForExport, mergePackagesInto, effResolve (the inherit-chain resolver behind pkgEffFg/pkgEffBg), and optList — with every dependency passed as a parameter so there is no DOM and no module-global reliance. generate.py inlines it into the page the same way it inlines colormath.js (strip exports, placeholder, integrity check), so the browser runs the same code the tests import. app.js keeps thin wrappers (pname, seedPkgmap, ddList, pkgEffFg, pkgEffBg) that pass the live PALETTE / APPS / PKGMAP into the core, so no call site changed and the built DOM is byte-identical to before. test-app-core.mjs adds 18 Normal/Boundary/Error tests over the extracted logic — name resolution, the seed/export/merge round trip, the inherit chain including a cycle that must terminate at null, and the "(gone)" dropdown entry — plus an inline-integrity check that the page carries the core verbatim. The node suite goes 25 to 43 tests; python templating gains the app-core integrity assertion.
Diffstat (limited to 'scripts/theme-studio/package-inventory.json')
0 files changed, 0 insertions, 0 deletions