-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: master
Are you sure you want to change the base?
Conversation
example-ssr/src/modules/x/basic/__tests__/basic-data-driven.ssr-client.test.js
Outdated
Show resolved
Hide resolved
example-ssr/src/modules/x/basic/__tests__/basic-data-driven.ssr-client.test.js
Show resolved
Hide resolved
example-ssr/src/modules/x/basic/__tests__/basic-data-driven.ssr-client.test.js
Outdated
Show resolved
Hide resolved
// 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 |
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.
How do we check for hydration errors? Does jest.ssr-client.setupAfterEnv.js do this automatically for all ssr-client
test suites?
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.
Yes, that's the only way that was suggested by Nolan.
No description provided.