Skip to content

fix: make test:e2e:smoke find its files on Windows (#187)#188

Merged
debugmcpdev merged 1 commit into
mainfrom
fix/187-smoke-glob-windows
Jul 14, 2026
Merged

fix: make test:e2e:smoke find its files on Windows (#187)#188
debugmcpdev merged 1 commit into
mainfrom
fix/187-smoke-glob-windows

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Summary

Fixes #187pnpm run test:e2e:smoke failed on Windows with "No test files found, exiting with code 1" because cmd.exe (pnpm's default script shell on Windows) never expands the * in vitest run tests/e2e/mcp-server-smoke*.test.ts, so vitest received the pattern as a literal filter matching nothing. Bash expands the glob before vitest sees it, which is why CI (ubuntu) and Git Bash users never hit this.

The fix

The issue suggested quoting the glob, but verification showed vitest 4 treats positional CLI args as substring filters, not globs — the quoted pattern also matches nothing (and worse: vitest list exits 0 with zero files, so a quoted glob would silently run nothing wherever globbing is left to vitest). So this uses the issue's fallback suggestion — a filter that needs no shell expansion:

"test:e2e:smoke": "vitest run tests/e2e/mcp-server-smoke"

Verification

  • npx vitest list --filesOnly tests/e2e/mcp-server-smoke → exactly the 18 smoke files, from both PowerShell and cmd /c (the shell pnpm uses for scripts)
  • Substring filters only apply to files already matched by the config's include (*.test.ts), so helpers can't leak in
  • Pre-push hook: lint + build + 2488 unit / 21 integration tests green

🤖 Generated with Claude Code

Under cmd.exe (pnpm's script shell on Windows) the glob in
"vitest run tests/e2e/mcp-server-smoke*.test.ts" is never expanded and
vitest treats it as a literal filter matching nothing. Vitest 4 CLI
args are substring filters, not globs (a quoted pattern also matches
nothing), so use the substring filter tests/e2e/mcp-server-smoke,
which needs no shell expansion and matches the same 18 smoke files on
every platform.

Fixes #187

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev debugmcpdev merged commit 5d913ef into main Jul 14, 2026
10 checks passed
@debugmcpdev debugmcpdev deleted the fix/187-smoke-glob-windows branch July 14, 2026 09:00
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.

test:e2e:smoke finds no test files on Windows (unexpanded glob)

2 participants