-
Notifications
You must be signed in to change notification settings - Fork 413
test(web-test-runner): run hydration tests in CI @W-18780671 #5398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved to a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved to a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved to a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Largely copied from the karma version, with some rekerjiggering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Largely copied from the karma version.
Details
Another step of our migration to
web-test-runner
. Hydration tests are even more annoyingly convoluted than the basic integration tests. First, the component code is bundled into an IIFE and executed in avm.Script
to get the server-side generated markup. Then that, the client-side component code, and test config are wrapped in a generated test function. I've moved some of it to ESM imports, but getting rid of all of the IIFEs means using the experimentalvm.Module
. (Which will be fine, just more effort, so this PR is a checkpoint.)Also, apparently this has been broken for a while:
I believe this is because
sanitizeHtmlContent
was being directly exported. Changing that to a wrapper function and updating a non-exported variable fixed the problem.Lastly, this also includes some cleaning up of the helper files because they were just a littered dumping ground of utilities.
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item