nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
1.89k stars 75 forks source link

[WIP] fix: wait for hydration via react effect #319

Closed katywings closed 2 months ago

katywings commented 3 months ago

This PR tries to reduce the flakiness of the tests as much as possible. But it isn't perfect: sometimes the page hydration just fails for unknown reasons, especially on Windows. The new isReady check tries to recover from hydration fails, by reloading the page, which seems to work pretty solidly. Longterm though we should think about rewriting a lot of the tests, especially those related to HMR & fixture.updateFile.

I ran the updated tests countless times with force-pushes and so far got zero fails with the latest version.

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: 5f825cc2dd6bc1b2a5fbd67c8a634d04857dfbc2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 3 months ago

@katywings is attempting to deploy a commit to the Nikhil Saraf's projects Team on Vercel.

A member of the Team first needs to authorize it.

codesandbox[bot] commented 3 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview