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

Sample test coverage for SSR + hydration #314

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

Shinoni
Copy link
Contributor

@Shinoni Shinoni commented Sep 19, 2024

No description provided.

@Shinoni Shinoni marked this pull request as ready for review September 25, 2024 18:54
@Shinoni Shinoni changed the title Cmp visual testing - stubs Sample test coverage for SSR + hydration Sep 25, 2024
// Check that the component is an instance of HTMLElement and has a shadow root
expect(componentEl?.shadowRoot).not.toBeNull();

// Hydrate the component with the provided props

Choose a reason for hiding this comment

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

How do we check for hydration errors? Does jest.ssr-client.setupAfterEnv.js do this automatically for all ssr-client test suites?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's the only way that was suggested by Nolan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants