Skip to content
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

test(hydration): test non-static-optimized #4657

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

nolanlawson
Copy link
Collaborator

Details

Fixes #4586

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

@nolanlawson nolanlawson requested a review from a team as a code owner October 17, 2024 22:34
const hasMatchingStyleAttr = shouldValidateAttr(data, 'style')
? validateStyleAttr(vnode, elm, data, renderer)
: true;
if (isFalse(hasMatchingAttrs && hasMatchingClass && hasMatchingStyleAttr)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to do class first, style second to match the ordering of non-static-optimized nodes. Otherwise our tests check for the ordering of console.errors and it's different between the two.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test was previously split into two. Now it has an if (process.env.DISABLE_STATIC_CONTENT_OPTIMIZATION) check instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ditto.

@nolanlawson
Copy link
Collaborator Author

Coverage is the same before and after.

@nolanlawson nolanlawson merged commit d971637 into master Oct 18, 2024
11 checks passed
@nolanlawson nolanlawson deleted the nolan/hydration-non-static branch October 18, 2024 17:36
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.

Run hydration tests in both static-optimized and non-static-optimized modes
2 participants