Repository navigation
Add Turbopack HMR subscription initialization regression tests - #98260
timneutkens wants to merge 3 commits into
Conversation
Failing test suitesCommit: 416bf20 | About building and testing Next.js
Expand output● hmr-deleted-page › should not show errors for a deleted page
Expand output● warm-restart task statistics › snapshot of tasks with cache misses on warm dev restart ● warm-restart task statistics › snapshot of tasks with cache misses on warm dev restart ● Test suite failed to run
Expand output● handle-non-hoisted-swc-helpers › should work ● Test suite failed to run
Expand output● use-cache-custom-handler-dev › serves a short-expire value warm through a custom handler and re-warms it on each reload ● use-cache-custom-handler-dev › stops serving a front-cached entry after the backing cache is purged out-of-band
Expand output● create-next-app prompts › should prompt user for choice if directory name is absent ● create-next-app prompts › should use default for --ts when other flags are provided ● create-next-app prompts › should use default import alias when other flags are provided ● create-next-app prompts › should use recommended defaults when user selects that option ● create-next-app prompts › should show reuse previous settings option when preferences exist
Expand output● create-next-app --no-app (Pages Router) › should create JavaScript project with --js flag ● create-next-app --no-app (Pages Router) › should create project inside "src" directory with --src-dir flag ● create-next-app --no-app (Pages Router) › should create an empty project with --empty flag ● create-next-app --no-app (Pages Router) › should create an empty TailwindCSS project with --empty flag
Expand output● create-next-app --api (Headless App) › should create TypeScript project with --ts flag
Expand output● Error overlay - RSC build errors › Skipped in webpack › should handle successive HMR changes with errors correctly
Expand output● warm-restart task statistics › snapshot of tasks with cache misses on warm dev restart ● warm-restart task statistics › snapshot of tasks with cache misses on warm dev restart ● Test suite failed to run
Expand output● hmr-deleted-page › should not show errors for a deleted page
Expand output● create-next-app with package manager npm › should use npm for --use-npm flag ● create-next-app with package manager npm › should use npm for --use-npm flag with example ● create-next-app with package manager npm › should use npm when user-agent is npm with example
Expand output● create-next-app --app (App Router) › should create JavaScript project with --js flag ● create-next-app --app (App Router) › should create TypeScript project with --ts flag ● create-next-app --app (App Router) › should create project inside "src" directory with --src-dir flag ● create-next-app --app (App Router) › should create TailwindCSS project with --tailwind flag ● create-next-app --app (App Router) › should create an empty project with --empty flag ● create-next-app --app (App Router) › should create an empty TailwindCSS project with --empty flag |
fabffaf to
dbf50f7
Compare
Summary
Adds deterministic Rust coverage proving that the HMR subscription baseline retains the first observed version when invalidation overlaps initialization. The
project.rsproduction diff only extracts the existing baseline read into a helper so the colocated#[cfg(test)]module exercises the exact production path.Adds a Turbopack development-mode e2e test that edits a client component as its page-specific HMR subscription is established, then verifies that the initial update reaches the browser without a full-page reload.
This PR is stacked on #98215 and contains the regression coverage for that fix.
Verification
cargo test -p next-api --libcargo fmt --all -- --checkNEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-turbo test/development/app-dir/hmr-dynamic-component/hmr-dynamic-component.test.ts -t "should not lose an edit while establishing the client HMR subscription"pnpm lint-eslint test/development/app-dir/hmr-dynamic-component/hmr-dynamic-component.test.ts