fix(init): make init tests shell-independent and verify embedded scripts#150
Merged
fix(init): make init tests shell-independent and verify embedded scripts#150
Conversation
Tests previously inherited the host's $SHELL via defaultShellType(), causing failures on non-bash shells. Now all three tests explicitly pass --shell= and cover both bash and fish, asserting against the actual embedded script content. Fixes #148 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
cc @jamielinux |
There was a problem hiding this comment.
Pull request overview
Updates init command tests to be deterministic across developer environments by avoiding reliance on the host $SHELL, and strengthens assertions by matching against the embedded script content.
Changes:
- Refactors
inittests to pass--shell=explicitly (bash + fish coverage) instead of relying ondefaultShellType(). - Updates assertions to check for inclusion of the full embedded script strings (status shortcuts, git wrapper, aliases) rather than smaller fragments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
A few tests previously inherited the host's
$SHELLviadefaultShellType(), causing failures on non-bash shells. Now all three failing tests explicitly pass--shell=and cover both bash and fish, asserting against the actual embedded script content instead of a fragment.Fixes #148 (see the issue for discussion).
Supersedes #149.
(I may be asking for trouble trying to use Claude to fix this issue after it created it to begin with, but I specifically told it how I wanted this problem fixed, and I verified output seems reasonable-ish, so I'm down for the experience).