Skip to content

Component tests#5

Draft
opcode81 wants to merge 22 commits into
developfrom
component-tests
Draft

Component tests#5
opcode81 wants to merge 22 commits into
developfrom
component-tests

Conversation

@opcode81

Copy link
Copy Markdown

WIP; See the new memory

opcode81 added 22 commits June 5, 2026 12:00
Add test case covering virtually all cases in the diagram of
sync cases in the developer documentation.

Changes in test principles:
* transformations -> operations
* operations can include tests
* more well-defined roles of relevant shapes/items
  and more well-defined operations (particularly make-nested)
The propagation watcher (watch-component-changes) we start to exercise
automatic component sync also schedules thumbnail renders on every
component-changed event. Thumbnail rendering reaches dom/get-css-variable
-> window.getComputedStyle, which has no window in the headless test
runner. The render is async/queued, so it fired during a later test in
the full suite and crashed the run (each test passed in isolation).

Stub the public seam dwth/update-thumbnail to a no-op event via a :each
before/after fixture (the same set!-and-restore pattern as the wasm-mock
helpers, whose :after runs only after each async test's done). Scope is
limited to this namespace; other suites see the real function. Full sync
suite now stable: 8 tests, 120 assertions, green across repeated runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant