node --test test/server.test.mjs test/dial.test.mjsruns the two Node suites: the server (static serving and traversal, the feed proxy, the config API and its guards, a broken config told rather than hidden, weather and geocoding, the channels inventory across drives, durations, titles read from inside files, the tuner bus, the vitals, version, and power endpoints, the command line) and the broadcast clock (positions, schedules with overnight windows, the timeline with breaks, the guide grid and what it names, the dial, the volume cycle and the volume steps, and the counting of button presses).- Browser helpers: start the server and open
http://localhost:1982/test/harness.htmlfor the same dial math in a browser plus the DOM-bound helpers (feed parsing, sanitizing, the crawl text, the clock faces). - End to end:
node test/e2e.mjsputs the real display in a headless Chromium on a throwaway config and drives it the way a living room does: signs on to the board, tunes the guide, plays a video channel through a file boundary, lands on a test card, presses volume and power, turns the dial from the keyboard, works a joystick (the stick for the dial and the volume, two presses for power, ten for the shutdown, with the request caught before it reaches a machine), saves from the control room and watches the set reload itself, asks the remote how many sets are listening, turns faux CRT on and checks the console, the glass, the dial, and the switch-off, and breaksconfig.jsonto see the set say so. It needs Playwright (not a dependency of the station:npm i playwright && npx playwright install chromiumin a scratch folder, then run withNODE_PATH=<that>/node_modules) and ffmpeg for its two test clips (FFMPEG=<path>if it is not on the PATH). Without Playwright it says so and exits clean. - Tuner drill by hand: with more than one channel on the dial,
curl -X POST http://localhost:1982/api/tune -H "content-type: application/json" -d "{\"cmd\":\"up\"}"and watch the display change channels - the whole bus in one command. - Failure drill:
node server.js --chaosserves mock feeds that randomly hang and fail, so you can watch the Community Board shrug it off. - Soak: open
http://localhost:1982/?soak=1for accelerated channel-82 page flips and refreshes with stats logged to the console.