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

Use engine-server fixtures in hydration tests #5013

Open
nolanlawson opened this issue Dec 5, 2024 · 4 comments
Open

Use engine-server fixtures in hydration tests #5013

nolanlawson opened this issue Dec 5, 2024 · 4 comments
Labels
hydration Having to do with hydration after SSR tests Up for grabs Issues that are relatively small, self-contained, and ready for implementation USER STORY

Comments

@nolanlawson
Copy link
Collaborator

nolanlawson commented Dec 5, 2024

Right now our hydration tests (in integration-karma) are distinct from our engine-server tests. However, we have great code coverage in engine-server/src/__tests__/fixtures. We could:

  • Have an additional set of hydration tests that pull from the engine-server fixtures
  • These hydration tests would merely assert that the content renders on the server and the client and does not encounter any hydration mismatch warnings.
@nolanlawson nolanlawson added tests hydration Having to do with hydration after SSR Up for grabs Issues that are relatively small, self-contained, and ready for implementation USER STORY labels Dec 5, 2024
Copy link

git2gus bot commented Dec 6, 2024

This issue has been linked to a new work item: W-17381895

@cardoso
Copy link
Contributor

cardoso commented Dec 6, 2024

Would this be a good opportunity to move the fixtures in engine-server to a separate folder? That could simplify things for the ssr-compiler which is doing this too. Although engine-server would remain producing the reference expectations for ssr-compiler.

I would create it outside the packages folder though, as it feels already bloated with private packages which could benefit a lot from not sharing the same configs and build scripts.

On a second thought, maybe this should be a separate PR, even if this one is done first.

@cardoso
Copy link
Contributor

cardoso commented Dec 6, 2024

These hydration tests would merely assert that the content renders on the server and the client and does not encounter any hydration mismatch warnings.

Will it benefit from running in every browser in CI? I would expect this to be fairly browser-independent, but probably wishful thinking.

@nolanlawson
Copy link
Collaborator Author

Would this be a good opportunity to move the fixtures in engine-server to a separate folder?

I don't have a strong opinion on this. Although eventually they will have to move, since engine-server will be deprecated. 🙂

Will it benefit from running in every browser in CI?

Call it paranoia. 😆 We rarely have browser-specific hydration bugs, but you never know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hydration Having to do with hydration after SSR tests Up for grabs Issues that are relatively small, self-contained, and ready for implementation USER STORY
Projects
None yet
Development

No branches or pull requests

2 participants