aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/README.md
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-08 22:09:13 -0500
committerCraig Jennings <c@cjennings.net>2026-06-08 22:09:13 -0500
commite6e13d2c6f612ee846a4ede9e8a8d77f6b1d3ac4 (patch)
tree4cdc75da8ef02a41910a6a9bc5ef1c29797199cb /scripts/theme-studio/README.md
parentffaf5e8eea48d528217324b94e01f2a400272f84 (diff)
downloaddotemacs-e6e13d2c6f612ee846a4ede9e8a8d77f6b1d3ac4.tar.gz
dotemacs-e6e13d2c6f612ee846a4ede9e8a8d77f6b1d3ac4.zip
test(theme-studio): add a one-command test runner and make target
The browser hash gates were run by hand through headless Chrome, so a picker-JS regression only surfaced if someone remembered to run them. run-tests.sh now drives the whole pyramid in one command: regenerate the page, the Python templating tests, the Node unit tests plus inline-integrity, a syntax check of the spliced page script, and the six browser hash gates. It exits non-zero on any failure, and make theme-studio-test calls it. The browser gates need a Chromium-family browser. When none is found they report SKIPPED rather than passing, so a machine without Chrome can't turn the gates silently green.
Diffstat (limited to 'scripts/theme-studio/README.md')
-rw-r--r--scripts/theme-studio/README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/theme-studio/README.md b/scripts/theme-studio/README.md
index 68d74815d..044ccc2e5 100644
--- a/scripts/theme-studio/README.md
+++ b/scripts/theme-studio/README.md
@@ -30,6 +30,24 @@ During color work, disable Hyprland inactive-window dimming so colors read true:
hyprctl keyword decoration:dim_inactive false
```
+## Tests
+
+```bash
+make theme-studio-test # from the repo root, runs the whole pyramid
+scripts/theme-studio/run-tests.sh # or call the runner directly
+```
+
+The runner regenerates the page, runs the Python templating tests
+(`test_generate.py`), the Node unit tests for `colormath.js`
+(`test-colormath.mjs`, including the inline-integrity check), a syntax check of
+the spliced page script, and the browser hash gates in headless Chrome
+(`#selftest`, `#cursortest`, `#readouttest`, `#deltatest`, `#oklchtest`,
+`#planetest`). It exits non-zero on any failure. The browser gates need a
+Chromium-family browser; without one they report SKIPPED rather than passing
+silently. The pure color math and the extracted picker logic (`planeCell`,
+`paletteWarnings`) live in `colormath.js` so they are unit-tested directly in
+Node; the DOM glue is covered by the browser hash gates.
+
## Files
- `generate.py` — emits the HTML+JS, and embeds the package data. Edit here to