Repository navigation
Pulse tests: split into node:test files per area - #126
Merged
Merged
Conversation
Each of the 319 ok() groups is now a test(); shared fixtures live in tests/helpers.mjs, helpers used by one area stay in that area's file. npm test runs node --test. No change to the card or any YAML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qzFkqmyQUbCRtqsqKXSRv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase E step 1 of the Pulse quality plan. Tests only:
www/pulse-card.js, the YAML and the workflow are untouched (npm testis still the CI command, and the path filter is unchanged).What changed
tests/pulse-card.test.mjs(319ok()groups, custom harness) is split intonode:testfiles. Each group is now atest()usingnode:assert/strict, so a failure is reported on its own and the rest still run.tests/package.json:"test": "node --test".rooms.test.mjsattention.test.mjsfeed.test.mjsenergy.test.mjshouse.test.mjssettings.test.mjscameras.test.mjstabbar.test.mjsactions.test.mjsheating.test.mjsgardens.test.mjselement.test.mjstheme.test.mjsyaml.test.mjsgolden.test.mjsfixtures/golden.jsonAreas follow how the groups cluster, so
heating,gardens,settings,element,themeandgoldenwere added to the suggested list. Shared fixtures (card load under the default theme,mk,withRooms, row parsers, ...) are intests/helpers.mjs; helpers only one area uses sit at the top of that area's file. Statement order is preserved within each file.Counts
node pulse-card.test.mjs); 2292assertcalls (grep -oE "assert(\.[a-zA-Z]+)?\(" | wc -l).npm test); 2292assertcalls overtests/*.mjs. Nothing dropped.Checks
PULSE_GOLDEN_WRITE=1 node golden.test.mjs(fromtests/) regeneratesgolden.json; it came out byte-identical.Run
cd tests && npm ci && npm test, or one area:node --test rooms.test.mjs.🤖 Generated with Claude Code
https://claude.ai/code/session_016qzFkqmyQUbCRtqsqKXSRv