You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: VS Code Extension Test Run Hangs Indefinitely with Async onExit in Custom Reporter #37867
I'm trying to implement a similar experience as Playwright's HTML report using my custom reporter: when onExit callback is called, I launch an HTTP server and serve my report's HTML.
However, this makes the tests to stuck when launched via VSCode.
At the very least, I'd love to have a way to detect when tests a launched via VSCode extension so that I can avoid starting HTTP server.
Ideally, maybe Playwright VSCode extension can force-kill the on-going process when tests are being re-run?
Would something like _isTestServer in the public API help your reporter not to hang when launched from the VS Code extension? We could probably have hard kill on stop/test restart but I guess this wouldn't be great for your reporter.
Another thing that's interesting is that we're having trouble listing tests for this repo. Seems like your reporter is being executed where it shouldn't be.
Hmm, the test listing problem seems to be on the VS Code end. The test runner doesn't show the should work test under the a.test.ts tree item, even though when I open a.test.ts the editor shows the Play button annotation for the test. Let me file that upstream.
Edit: Doesn't happen outside of your repro, not sure why.
Activity
yury-s commentedon Oct 16, 2025
Would something like
_isTestServerin the public API help your reporter not to hang when launched from the VS Code extension? We could probably have hard kill on stop/test restart but I guess this wouldn't be great for your reporter.aslushnikov commentedon Oct 16, 2025
yep,
isTestServerwould be nice!Skn0tt commentedon Oct 17, 2025
Another thing that's interesting is that we're having trouble listing tests for this repo. Seems like your reporter is being executed where it shouldn't be.
Skn0tt commentedon Oct 17, 2025
Hmm, the test listing problem seems to be on the VS Code end. The test runner doesn't show the
should worktest under thea.test.tstree item, even though when I opena.test.tsthe editor shows the Play button annotation for the test. Let me file that upstream.Edit: Doesn't happen outside of your repro, not sure why.
pavelfeldman commentedon Oct 24, 2025
If we make it public, let's make it based on the terminal interactivity. I.e. onExit will only be blocked by HTML reporter in interactive TTY shells.
Skn0tt commentedon Oct 28, 2025
Mirroring our offline discussion: Let's not introduce a new API, but ensure that
process.stdin.isTTYis correct.fix(node/process): make `process.stdin.isTTY` writable
fix(node/process): make `process.stdin.isTTY` writable
fix(node/process): make `process.stdin.isTTY` writable (#31464)
fix(node/process): make `process.stdin.isTTY` writable (#31464)
fix(node/process): make `process.stdin.isTTY` writable (denoland#31464)