next.js
e2e19c48 - test(dev): add dedicated compiler polling coverage (#97673)

Commit
30 days ago
test(dev): add dedicated compiler polling coverage (#97673) ### What? Adds a dedicated development integration test for compiler file watching in polling mode under both webpack and Turbopack. It also removes obsolete `CHOKIDAR_USEPOLLING` / `CHOKIDAR_INTERVAL` variables from the unrelated `read-only-source-hmr` suite, which remains focused on read-only source semantics and normal watcher behavior. Stack: **5/5** · Previous: #98737 ### Why? Next.js did not have an e2e/development test dedicated to `watchOptions.pollIntervalMs`. Existing Rust coverage checks watcher modes, while the filesystem-watcher fuzzer is manual rather than part of the normal development-test matrix. The test also regresses notify-rs/notify#981. Older PollWatcher versions stored ordinary-file mtimes at whole-second precision, so a second edit in the same second compared equal and was permanently dropped. The preceding stack layer upgrades to `notify 9.0.0-rc.5`, which preserves nanosecond precision for regular files without content hashing. ### How? The dedicated pages-directory fixture configures only `watchOptions.pollIntervalMs`: - webpack maps it to compiler `watchOptions.poll`; - Turbopack passes it to notify and selects PollWatcher. It intentionally does not set `WATCHPACK_POLLING`, create/delete routes, or test the dev-server route watcher, keeping the test focused on compiler-level polling. The test writes two versions of an already-loaded page with controlled mtimes at +100 ms and +200 ms inside the same future whole second. It waits for the first HMR update before making the second write, requiring two distinct watcher events rather than allowing changes to coalesce. A negative control with the older npm-provided native binary observes the first update but permanently misses the second. A fresh local native build from the full stack passes both updates. The dedicated test and `read-only-source-hmr` pass under both Turbopack and webpack; Prettier and ESLint also pass. <!-- NEXT_JS_LLM --> <!-- fleet 6488265d-2685-49d3-b632-6511b4b47690 --> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com> Co-authored-by: Benjamin Woodruff ‮ <180404+bgw@users.noreply.github.com>
Author
Parents
Loading