fix: make test:e2e:smoke find its files on Windows (#187)#188
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #187 —
pnpm run test:e2e:smokefailed on Windows with "No test files found, exiting with code 1" because cmd.exe (pnpm's default script shell on Windows) never expands the*invitest 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 listexits 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:Verification
npx vitest list --filesOnly tests/e2e/mcp-server-smoke→ exactly the 18 smoke files, from both PowerShell andcmd /c(the shell pnpm uses for scripts)include(*.test.ts), so helpers can't leak in🤖 Generated with Claude Code