Skip to content

ZshInstaller tests fail on machines with a real Oh My Zsh install (17/50 failures) #1321

Description

@stanleykao72

Summary

test/core/completions/installers/zsh-installer.test.ts currently fails 17 of 50 tests on any development machine that has a real Oh My Zsh installation, because the tests read the developer's actual $HOME / $ZSH environment instead of an isolated fixture.

Reproduction

On a machine with Oh My Zsh installed (~/.oh-my-zsh present):

npx vitest run test/core/completions/installers/zsh-installer.test.ts
# → Tests  17 failed | 33 passed (50)

On a clean CI container the suite passes, which is why this doesn't show up in GitHub Actions — but it makes the suite red for local contributors and masks real regressions in this file.

Verified on current main (v1.5.0, 8886e3a).

Fix

Isolating the installer tests from the host environment (stubbing HOME/ZSH detection in test setup) fixes all 17. A ready fix (+10 lines, test-only) is on this branch:

https://github.com/stanleykao72/OpenSpec/tree/fix/zsh-installer-test-isolation

Happy to open a PR if you'd like it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions