Skip to content

Make the test suite pass on macOS and with OpenCode v2 installed - #60

Merged
JayPokale merged 1 commit into
JayPokale:mainfrom
JYunth:test/macos-and-host-opencode
Nov 27, 2026
Merged

JayPokale merged 1 commit into
JayPokale:mainfrom
JYunth:test/macos-and-host-opencode

Conversation

@JYunth

@JYunth JYunth commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Six tests fail on macOS for me with OpenCode v2 installed. CI only runs on Ubuntu without OpenCode, so it doesn't hit them. Test-only changes, same idea as #50:

  • The OpenCode installer tests inherit the real PATH, so a v2 opencode switches the installer to the v2 plugin layout and four tests fail. They now run with an empty PATH (v1) unless they pass fakeOpencode(). This one isn't macOS-specific.
  • The VS Code Copilot mcp.json test assumed the XDG folder, but on macOS VS Code uses ~/Library/Application Support, same as bin/lib/mcp.js.
  • The symlinked state root test compared a realpath with the plain tmpdir path, which differs on macOS because /var links to /private/var.

Before: 263 pass, 6 fail. After: 269 pass. I haven't run it on Windows, though.

Unrelated, but test_mcp_proxy.js:63 failed for me about once in six runs, on main too.

Six tests failed on macOS with OpenCode v2.1.1 on PATH:

- Four OpenCode installer tests inherited the real PATH, so a v2
  opencode switched the installer to the v2 plugin layout. They now
  run with an empty PATH (v1 layout) unless they pass fakeOpencode().
- The VS Code Copilot mcp.json test assumed the XDG/APPDATA folder;
  on macOS VS Code uses ~/Library/Application Support.
- The symlinked state root test compared a realpath with an unresolved
  tmpdir path; on macOS /var is a link to /private/var.
@JYunth
JYunth requested a review from JayPokale as a code owner November 26, 2026 14:10
@vercel

vercel Bot commented Nov 26, 2026

Copy link
Copy Markdown

@JYunth is attempting to deploy a commit to the jaypokale35gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JayPokale
JayPokale merged commit 2f927e7 into JayPokale:main Nov 27, 2026
3 of 4 checks passed
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.

2 participants