Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Oct 29, 2025

Closes #37867. Ensures reporters can use process.stdin.isTTY to detect whether they can listen for SIGINT or not. Migrates HTML reporter to use it.

Sadly, it's hard to properly test this because we'd need a TTY emulator like node-pty to turn on isTTY in the subprocess. Unsure if that's worth it, so I added a comment instead.

I'm not expecting behaviour changes from the HTML reporter change, because:

  • VS Code test servers are already in a child process, so isTTY is undefined
  • UI Mode test servers intercept stdio, so they'll get the faked isTTY
  • Watch mode doesn't intercept stdio, so its usage of isTTY will stay the same

For 3rd party reporters that already depend on process.stdin.isTTY today, we'll have a behaviour change in UI mode, but I think that's innocent. It's also the whole point of the change.

@Skn0tt Skn0tt changed the title Is tty chore(ui): ensure isTTY is correct Oct 29, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Skn0tt Skn0tt marked this pull request as ready for review October 29, 2025 09:56
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Skn0tt Skn0tt requested a review from dgozman October 29, 2025 13:45
Copy link
Contributor

@agg23 agg23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor clarity suggestions

@Skn0tt Skn0tt merged commit e86d620 into microsoft:main Oct 29, 2025
34 of 35 checks passed
@github-actions
Copy link
Contributor

Test results for "MCP"

1 failed
❌ [chrome] › mcp/cdp.spec.ts:20 › cdp server @mcp-windows-latest

2530 passed, 108 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-goto.spec.ts:83 › should work with Cross-Origin-Opener-Policy `@firefox-ubuntu-22.04-node18`
⚠️ [playwright-test] › ui-mode-test-attachments.spec.ts:61 › should contain binary attachment `@windows-latest-node18-1`

47196 passed, 813 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: VS Code Extension Test Run Hangs Indefinitely with Async onExit in Custom Reporter

3 participants