Files
oh-my-opencode/src/features/claude-code-plugin-loader
YeonGyu-Kim 23582ea9a5 fix(test): isolate discovery tests from global env var contamination
The discovery.test.ts was using process.env.CLAUDE_PLUGINS_HOME to set
the plugins directory, but this global state could be affected by other
tests running in parallel, causing flaky failures with errors like:
  Expected: "oh-my-openagent"
  Received: "demo"

Changes:
- Added pluginsHomeOverride option to PluginLoaderOptions type
- Modified discoverInstalledPlugins to accept optional pluginsHomeOverride
- Modified loadInstalledPlugins to accept optional pluginsBaseDir
- Updated all 3 discovery tests to use pluginsHomeOverride instead of
  relying on global process.env.CLAUDE_PLUGINS_HOME

This makes the tests properly isolated and deterministic regardless of
test execution order or parallelization.

Fixes CI failure on dev branch.
2026-04-05 11:34:32 +09:00
..