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

[WIP] Skip some client tests for SSR #261

Merged
merged 2 commits into from
Jan 24, 2017

Conversation

PaulBGD
Copy link
Member

@PaulBGD PaulBGD commented Jan 23, 2017

This adds the skip-ssr option for tests. This builds on top of #253

There are a few tests that I think should pass and are issues with the SSR:

@PaulBGD PaulBGD changed the title Work on skipping some tests [WIP] Skip some client tests for SSR Jan 23, 2017
@PaulBGD PaulBGD force-pushed the universal-tests-working branch from 7033873 to 2673c10 Compare January 23, 2017 21:45
@PaulBGD
Copy link
Member Author

PaulBGD commented Jan 23, 2017

@Rich-Harris Each of the tests that are currently failing appear to be issues with the SSR. Should I create an issue for each one of these then?

For example component-binding fails because the parent component doesn't take the default 2 way binded value from the child component, so x is undefined instead of 0.

@Conduitry
Copy link
Member

raw-mustaches doesn't look like a necessarily valid failure to me. On the client side, raw mustaches are handled by creating empty <noscript> elements, and then inserting the HTML adjacent to them. The server-side code doesn't need to do this. I don't think we need to enforce parity here.

@PaulBGD
Copy link
Member Author

PaulBGD commented Jan 24, 2017

@Conduitry The server should render the same code for rehydration purposes.

@Rich-Harris
Copy link
Member

Re raw-mustaches and <noscript> — I think it's okay if the SSR'd HTML doesn't include it, since any rehydration process will presumably need to be able to handle missing elements somehow anyway (still not entirely sure how rehydration will work though).

Also, there are definitely times when you might want to SSR parts of your app and then only instantiate parts of it on the client (we're doing exactly that in one of our current projects — all the workflow and performance benefits, but very little duplicated content), and in those cases skipping <noscript> is definitely valid

@Rich-Harris Rich-Harris merged commit c5e0e8a into sveltejs:universal-tests Jan 24, 2017
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.

3 participants