Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Is Going On Here
This PR does several things to ensure that when we run the VM in "serialize mode" on the server that we forgo some prop setting and namespace creation as they do not have any relevance on the server. This is done by setting up 2 environments in the tests; one for the server and one for the client. The server
Environment
usessimple-dom
and theNodeTreeContruction
class which allow us to safely produce the serialized HTML format for rehydration. The client environment works exactly like theEnvironment
that is used today in Glimmer and Ember applications.The test harness works by doing the SSR first, verifying the output is correct and then sets the serialized HTML as the starting point for the client-side tests. This allows for us to test the entire rehydration flow, along with cases where the server output and the client side construction do not match.
To make sure we have more comprehensive coverage this PR consolidates all the tests from initial-render-test.js into the new test harness. Also since the new test harness was very similar to content-test.js those are also consolidated here. These tests should be used as an example of how to migrate the rest of the tests.