Commit fff3329
fix(test): force-exit routes.test.js worker on Windows after suite completes
After all Routes subtests finish, node-pty's conpty_console_list_agent.js
helper process can crash with `AttachConsole failed` and keep stdio pipes
dangling on the test worker, preventing it from exiting before the per-file
--test-timeout (180s) fires. The whole file then gets marked as failed
even though every individual assertion passed.
The earlier --test-force-exit flag (added to npm test) only acts on the
parent test runner — it has no effect on per-file workers under
--test-isolation=process. Targeted Windows-only after() hook now schedules
a process.exit(0) with a 1.5s unref'd grace period, letting in-flight
pty.kill IPC settle before forcing the worker out. Non-Windows runs
keep full process-leak detection.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ec9432f commit fff3329
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4976 | 4976 | | |
4977 | 4977 | | |
4978 | 4978 | | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
4979 | 5000 | | |
0 commit comments