Repository navigation
Make the test suite pass on Windows - #186
Open
darthmolen wants to merge 3 commits into
Open
darthmolen wants to merge 3 commits into
darthmolen wants to merge 3 commits into
Conversation
With core.autocrlf=true on Windows, the working copy is CRLF while the build writes LF, so every rebuilt dist/ file showed as modified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parseConversationFile split the path on '/', so a Windows path with '\' separators always produced project 'unknown'. path.dirname uses the platform's separators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The file-lock EACCES test makes a directory unwritable with chmod, which Windows ignores. The wrapper SIGTERM test runs an extensionless shebang stub as `npm`, which Windows can't execute from PATH, and Windows has no catchable SIGTERM. Both still run on Linux and macOS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused changes correctly address Windows incompatibilities while retaining coverage on supported platforms.
Review effort: Balanced
Findings: None
What changed in this PR
Makes path handling and platform-specific tests compatible with Windows while preserving generated output consistency.
Changes:
- Uses platform-aware project path extraction.
- Skips unsupported POSIX-specific tests on Windows.
- Enforces LF checkouts across platforms.
| File | Description |
|---|---|
.gitattributes |
Enforces LF line endings. |
src/parser.ts |
Uses platform-aware path utilities. |
dist/parser.js |
Updates generated parser output. |
test/file-lock.test.ts |
Skips the chmod test on Windows. |
test/mcp-install-runner.test.ts |
Skips the SIGTERM test on Windows. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5 of 6 tasks
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
Three small fixes that make the test suite pass on Windows, so a local checkout there matches CI.
.gitattributesforces LF checkouts. Withcore.autocrlf=true, the default for Git on Windows, the working copy is CRLF whilenpm run buildwrites LF. Every rebuild then marks every file indist/as modified. The index is already all LF, so nothing is renormalized.parseConversationFileusespath.dirname. It split the path on/, so a Windows path with\separators always produced project'unknown'. This fixes the twoparser.test.tsfailures on Windows.describe.skipIfpattern. Both still run on Linux and macOS:chmodto make a directory unwritable, which Windows ignores.npm, which Windows can't execute fromPATH. Windows also has no catchable SIGTERM.Test plan
npm teston Windows 11: 342 passed, 8 skipped, 0 failed (previously 4 failures).🤖 Generated with Claude Code