ci(lit): Do not modify a2ui messages in testing harness#1623
Open
ditman wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Prettier configuration in the package.json files of both renderers/lit and renderers/lit/a2ui_explorer to reference a shared ignore path, and adds Prettier as a development dependency. Additionally, it wraps modified messages in structuredClone before processing in local-gallery.ts, and introduces initial value assertions for inputs in the live invitation builder tests. There are no review comments, and we have no additional feedback to provide.
8254c7f to
f3877ee
Compare
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.
Description
While setting up the integration tests for React, I found some weird failures with some test cases that pointed to A2UI Messages being modified by the testing harness as tests executed.
The solution is to deep clone the test case messages when a test is initialized so they're always "fresh". See it in angular here.
The problem also exists on the Lit testing harness, but it was being masked by the tests doing some sneaky initialization.
This PR removes the sneaky initialization of tests, and clones the messages so they pass as expected.
(It also adds a dependency on
prettierand ensures thatyarn formatworks, something that I found broken while attempting to format my changes before creating this PR)Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.