Repository navigation
test(rsc): make e2e file editor async and space out writes - #1489
Merged
Merged
Conversation
Vite's watcher drops a change event within 50ms of the previous one for the same path, so a fast edit-then-reset could lose the reset. Make the editor's edit/reset/resave async and wait at least 100ms between writes to the same file. Co-authored-by: James <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
hi-ogawa
added a commit
that referenced
this pull request
Oct 5, 2026
The editor write-spacing fix moves to its own PR, which makes the editor API async instead of sleeping synchronously. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…itor # Conflicts: # packages/plugin-rsc/e2e/use-cache-persistent.test.ts
Co-Authored-By: Claude Opus 5.5 <[email protected]>
hi-ogawa
marked this pull request as ready for review
October 5, 2026 08:58
hi-ogawa
added a commit
to james-elicx/vite-plugin-react
that referenced
this pull request
Oct 5, 2026
…-entry Take main's e2e/fixture.ts and e2e/use-cache-persistent.test.ts. The e2e deflake fixes from this PR landed separately in vitejs#1487, with the write spacing moved to vitejs#1489.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
main:dev-no-ssr › client hmron windows, stuck waiting forClient Counter: 1after the reset on every retryBack-to-back file edits in e2e could be silently dropped. Vite's file watcher ignores a change that arrives within 50ms of the previous one for the same path, so when the HMR round trip was fast, a test's reset landed inside that window and the dev server never saw it. The dev server then kept the edited content, and the test timed out waiting for the original text, as in the failure linked above.
The test file editor now waits at least 100ms between writes to the same file. Waiting needs to be async, so editing, resetting, and resaving now return promises and every test awaits them. The delay only happens when two writes to one file come back to back.
A missing
awaitwould not fail loudly, because the write would just happen a moment later. The e2e directory has no lint step to catch that, so every call site was updated in one pass.