Component tests#5
Draft
opcode81 wants to merge 22 commits into
Draft
Conversation
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.
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.
WIP; See the new memory