Open
Conversation
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 of the Pull Request
Adds tests to
UnitTests_SettingsModelto improve coverage. Tests include:SettingInheritanceFallback: Settings inherit from user defaults; unset settings fall back to built-in defaultsClearSettingRestoresInheritance:ClearXxx()removes the value at the current layer, causing fallback to the parentHasSettingAtSpecificLayer:HasXxx()distinguishes explicitly set values from inherited onesModifyProfileSettingAndRoundtrip: Change a profile setting via setter andToJson()reflects itModifyGlobalSettingAndRoundtrip: Change global settings via setter andToJson()reflects themModifyColorSchemeAndRoundtrip: Change a color scheme property and the serialized JSON reflects itFixupUserSettingsDetectsChanges: A clean roundtrip produces idempotent FixupUserSettings() (returns false)FixupCommandlinePatching: 4 sub-cases: CMD/PowerShell short names get patched to full paths, no-op when already clean, custom profiles are untouchedThis also updates
TestCloneInheritanceTreeto verify thatHasXxx()and settters that modify the clone don't modify the original.This is being done in preparation for auto-save to help ensure we don't have any regressions.
Validation Steps Performed
✅ Tests pass
✅ Manually reviewed the new tests, they make sense and do add value (though some are less valuable than others, admittedly)
✅ Sent Copilot on a quest to ensure we're not adding redundant tests. It did catch a few and remove them fwiw.