Commit 9dad5b0
committed
fix(tests): stop esbuild child process in global teardown for Node 22 CI
Node 22 changed stream.pipeline() to wait for the "close" event before
completing (nodejs/node#53462). Vite's internal esbuild child process
holds stdio handles open indefinitely, preventing the event loop from
draining after tests finish. This causes vitest to hang in CI on Node 22
even though all tests pass.
Adding a global teardown that calls esbuild.stop() explicitly kills the
esbuild process and releases its handles so vitest can exit cleanly.1 parent 617a63c commit 9dad5b0
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments