lwc
lwc copied to clipboard
Use `engine-server` fixtures in hydration tests
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-serverfixtures - These hydration tests would merely assert that the content renders on the server and the client and does not encounter any hydration mismatch warnings.
This issue has been linked to a new work item: W-17381895
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.
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.
Would this be a good opportunity to move the fixtures in
engine-serverto 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.