mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(router-plugin): cover the webpack and Rspack generator watch mode
The webpack branch of the route generator host had no coverage, and nothing checked that closing the compiler's watcher stops the generator's own chokidar watcher (route-tree hosts, round-3 mutation testing item G). In `compiler.watch` mode, per bundler: a created empty route file is scaffolded and added to the route tree; after `watching.close()`, a route file created later is left alone. The negative check needs a fixed wait (the generator's watcher closes asynchronously and nothing signals it); the test waits for the compiles to settle before closing, and cleans up only after the watcher closed. Passed on base in every run (5 runs). Mutants verified killed (through Nx): rp:1903 rp:1905 rp:1906 rp:1912 rp:1913 rp:1914 rp:1918 rp:1920 rp:1923 rp:1925 rp:1926; rp:1919 killed in 1 of 2 runs (webpack sometimes reports the created file through its own watcher too). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
754aa96719
commit
d9dad4804b
1 changed files with 115 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue