Skip to content

fix(test-runner): match file paths containing spaces on Windows#40783

Merged
yury-s merged 3 commits into
microsoft:mainfrom
yury-s:fix-40767
May 11, 2026
Merged

fix(test-runner): match file paths containing spaces on Windows#40783
yury-s merged 3 commits into
microsoft:mainfrom
yury-s:fix-40767

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 11, 2026

Summary

  • On Windows, createFileMatcher falls back to a forward-slash form to handle unix-style paths from Cygwin / Git Bash. It used url.pathToFileURL(), which percent-encodes spaces, so an absolute CLI arg like C:/test dir/example.spec.mjs never matched the collected file C:\test dir\example.spec.mjs (file URL contains test%20dir).
  • Replace the URL conversion with a plain separator normalization (filePath.split(path.sep).join('/')) so spaces (and other URL-reserved characters) are preserved.

Fixes #40767

@github-actions

This comment has been minimized.

@yury-s yury-s changed the title fix(test-runner): match absolute file paths containing spaces on Windows fix(test-runner): match file paths containing spaces on Windows May 11, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-session.spec.ts:99 › session stops when browser exits @mcp-windows-latest-firefox

7056 passed, 1068 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`

41751 passed, 850 skipped


Merge workflow run.

@yury-s yury-s merged commit 8c6a7e7 into microsoft:main May 11, 2026
44 of 45 checks passed
@yury-s yury-s deleted the fix-40767 branch May 11, 2026 21:33
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]: CLI file arguments with spaces in path fail to match on Windows

2 participants