Skip to content

ci(lit): Do not modify a2ui messages in testing harness#1623

Open
ditman wants to merge 3 commits into
a2ui-project:mainfrom
ditman:lit-fix-test-harness-mutating-messages
Open

ci(lit): Do not modify a2ui messages in testing harness#1623
ditman wants to merge 3 commits into
a2ui-project:mainfrom
ditman:lit-fix-test-harness-mutating-messages

Conversation

@ditman

@ditman ditman commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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 prettier and ensures that yarn format works, 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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ditman ditman force-pushed the lit-fix-test-harness-mutating-messages branch from 8254c7f to f3877ee Compare June 13, 2026 02:53
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