Skip to content

fix(reporter): strip ansi from test stdout when colors are disabled#40688

Open
pavelfeldman wants to merge 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-40683
Open

fix(reporter): strip ansi from test stdout when colors are disabled#40688
pavelfeldman wants to merge 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-40683

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

Summary

  • Wraps the reporter's stdout/stderr with a Writable that strips ANSI escapes when useColors is false (e.g. FORCE_COLOR=0), so user-printed ANSI sequences and reporter cursor codes don't leak into non-color output.

Fixes #40683

When useColors is false (e.g. FORCE_COLOR=0), wrap the reporter's
stdout/stderr with a Writable that strips ANSI escapes before
forwarding. This ensures user-printed ANSI sequences and reporter
cursor codes do not appear in non-color outputs.

Fixes microsoft#40683
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "MCP"

6 failed
❌ [chrome] › mcp/test-run.spec.ts:126 › test_run should stop when aborted @mcp-windows-latest-chrome
❌ [firefox] › mcp/cli-session.spec.ts:99 › session stops when browser exits @mcp-windows-latest-firefox
❌ [msedge] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-windows-latest-msedge
❌ [msedge] › mcp/annotate.spec.ts:110 › should abort annotation when last screenshot is removed @mcp-windows-latest-msedge
❌ [webkit] › mcp/config.ini.spec.ts:57 › ini config sets browser launch options @mcp-windows-latest-webkit
❌ [webkit] › mcp/config.spec.ts:138 › browser_get_config returns merged config from file, env and cli @mcp-windows-latest-webkit

7009 passed, 1058 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:476 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node22`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@ubuntu-latest-node22`

41658 passed, 851 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]: Workers force FORCE_COLOR=1 into spawned child env, ignoring parent NO_COLOR / FORCE_COLOR=0

1 participant